Android 2.2: A new lease on battery life
You'd think Android 2.2's acceleration of Java and JavaScript execution would boost overall speed, but the dramatic benefit lies elsewhere
Follow @infoworldWhen I got the over-the-air update from Android 2.1 to 2.2, I expected a faster and more reliable smartphone, based on Google's postings about the speed improvements to the Dalvik Java VM and V8 JavaScript engine. In truth, I barely notice the increased speed; the HTC Incredible already hummed along at a nice clip thanks to its 1GHz processor.
What I do notice is the greatly improved battery life.
[ Find out which mobile OS comes out on top in a head-to-head review of Google's Android 2.2 and Apple's iOS 4. | Keep up on key mobile developments and insights with our Mobilize newsletter. ]
Running Android 2.1, with moderately heavy use, the HTC Incredible's battery lasted about 14 hours. With Android 2.2, after that same period of time with the same usage pattern, the battery has 60 percent of its juice left. A light usage pattern leaves the smartphone's battery with 90 percent of its charge. This spectacular difference took me by surprise -- and removed the HTC Incredible's worst drawback.
This behavior actually makes sense. In Dan Bornstein's blog posting about the Dalvik JIT compiler, he says (italics mine):
"Dalvik" isn't exactly a household word (at least in my country), and most people wouldn't know a virtual machine if it hit them in the face, but when you tell them you were able to make their existing device work better -- run faster, use less battery -- they will actually take notice!
He goes on to explain about the JIT compiler and distinguishes between two kinds of applications.
Code that is written to run the CPU all-out can now do more in the same amount of time (running faster), and code that is written to be rate-limited can get its work done using less time and less of the CPU (using less battery). On the performance front in particular, we have seen realistic improvements of 2x to 5x for CPU-bound code, compared to the previous version of the Dalvik VM. This is equivalent to about 4x to 10x faster than a more traditional interpreter implementation.










