News

One reason Android 2.2 is fast - new Just In Time compiler for Dalvik virtual machine

Turbocharger tweaked under the hood

One reason Android 2.2 is fast - new Just In Time compiler for Dalvik virtual machine
With the new Android OS 2.2 release gaining plenty of kudos from Nexus One owners, Google has been unpicking some of the low level smarts that make it so much faster.

One key component is the Dalvik virtual machine, which has been updated for the first time since Android 1.0, significantly receiving a Just In Time compiler.

This translates application code into a form that either works faster or uses less CPU and battery, depending on how the application is set up.

Secret sauce

Over on the Android developers blog Dan Bornstein from the Dalvik dev team has been explaining more about the changes.

"To be clear, the differences aren't always dramatic, nor do they apply uniformly to all applications," he explains.

However, performance boosts of between 2 to 5 times can be expected for CPU-bound code.

Bornstein says he's particularly proud of two aspects of the JIT compiler; that it works in seconds and that it uses very little memory, the executable being under 100k and requiring only 100k of RAM to operate.

[source: Google Developers blog]
Contributing Editor

A Pocket Gamer co-founder, Jon is Contributing Editor at PG.biz which means he acts like a slightly confused uncle who's forgotten where he's left his glasses. As well as letters and cameras, he likes imaginary numbers and legumes.