PDF Print E-mail
Android 2.2 comes with JIT! Say hello to performance
Written by Edvard
Thursday, 27 May 2010 04:36

android-logo As most of you may have heard already, Android 2.2 (Froyo) has been released and it brings with it some pretty dramatic improvements and changes, especially under the hood. The one I find the most exciting is the inclusion of JIT (Just in Time) Compiler to the Dalvik VM which puts Android on steroids and gives vastly improved performance on certain areas.

So what is all this fuzz about? Well, read on for more details.

 

First off, the Just In Time (JIT) Compiler is now included in the Dalvik Virtual Machine, which serves a vital role in Android runtime. Every application in Android runs in its own process and they have their own instance of the Dalvik virtual machine. This means of course that Android devices can run multiple VMs effectively at the same time. The Dalvik VM relies on the Linux kernel for underlying functionality and its register-based and runs classes compiled by a Java language compiler that has been transformed into a Dalvik executable (.dex). But enough about that, on to JIT.

The JIT software component takes application code and translates it into something that runs faster all while the application continues to run. It kompiles byte code to machine code which can potentially give a performance increase of 200-500%. The results are quite dramatic although it doesnt affect every aspect of Android and it doesnt apply to every application either. Basically, code that is written to run the CPU to the max can no do more work in the same amount of time while code that is written to run the CPU more nicely can also get work done quicker with less stress on the CPU which comes with the added benefit of increased battery life. JIT reacts very quickly so for the user its not something you will notice apart from the improved performance.

Using the two benchmarking tools BenchmarkPI and Linpack, I have compared Android 2.1 with Android 2.2. The results being quite nice.

BenchmarkPI

Nexus One Android 2.1 calculated Pi in 3081 milliseconds

Nexus One Android 2.2 calculated Pi in 1198 milliseconds

Linpack

Nexus One Android 2.1: 7.276

Nexus One Android 2.2: 39.415

As you can see, the difference is quite significant. JIT really opens up a new door for Android and I think we can expect so see lots of exciting applications thanks to it. Its all in the hands of the developers now, really.

Android 2.2 is being pushed out to Nexus One devices now and the development community is bound to be working on some Android 2.2 ROMs for other devices as well

Discuss on the forums


Last Updated ( Friday, 11 June 2010 09:07 )