[sclug] OT: Two weeks with the HTC Hero and Android OS

Alex Butcher lug at assursys.co.uk
Wed Feb 17 21:35:42 UTC 2010

On Wed, 17 Feb 2010, Will Dickson wrote:

> David Given wrote:
>> I would recommend *not* doing anything in C unless you really, really
>> need the performance. This is because you will need to learn JNI.
> Not familiar with the device, but based on my knowledge of Java for PCs: if 
> you need performance, try doing it in Java first anyway and then compare the 
> two. Modern JIT-compiled Java may well be *faster* than calling out to C code 
> - I suspect that this is down to JNI overhead.
> If the device doesn't have a JIT, then the above is probably wrong, in which 
> case my apologies.

Android's Dalvik JVM doesn't have a JIT in release versions (though there is
an experimental one in the current tree), but not using Java excludes you
from using any of the Android frameworks.  As such, anyone with any sense
will probably be using Java for anything but compute-intensive stuff that
they've benchmarked as being significantly faster in native ARM machine
code.  Or the API/VM/whatever-they-call it that David's employer works on,
of course.  :-)

So, for Java books, it looks like I want something written post Java 6
(Bruce Eckel's "Thinking in Java, 4th Ed" which seems attractive to me for
its C-to-Java conversion approach, or Bloch's "Effective Java"?),
something about Android (Wrox's "Professional Android Application

> Will.

Best Regards,

More information about the Sclug mailing list