ART runtime increases Android performance 2x over Dalvik

tipoo

Senior member
Oct 4, 2012
245
7
81
ART runs much closer to native than Dalvik in my understanding. Some light reading:

http://source.android.com/devices/tech/dalvik/art.html

https://docs.google.com/spreadsheet/ccc?key=0AnE-DX9Fbr9KdFZtRlhQaWxmVG5XdDR3TFR1Q3JONnc&usp=sharing#gid=0
(benchmarks here)

http://www.xda-developers.com/android/new-runtime-compiler-in-android-4-4/#comment-1104912482

So I feel people need a quick primer on what this is and what it means.

First: Dalvik is the Virtual machine that all android apps run on. What's that mean? Well, when a developer writes an app using Java, it isn't compiled specifically for any single device. It has to run on a whole bunch of different ones that have all kinds of different CPU's (ARM, Intel, etc.). So, the java code gets compiled into "bytecode", which is half-way between human-readable source code and something that the CPU can understand. Dalvik takes this byte code and then translates it into something the CPU can actually understand. This is good, because it means your app should run on a bunch of different CPU's without you needing to code specifically for it.

Now ART is essentially a better version of this that supposedly should be capable of converting this bytecode into something much more efficient, something that the CPU can understand better. More efficient means two things - faster performance and as a byproduct, better battery life. It could also mean things like lower memory usage but it's a bit early to tell.



This makes me wonder two things. First, how bad was Dalvik that 2x performance is easily attainable in a still early unoptimized release? And second, for balls sake, how blisteringly fast will todays already crazy fast devices be on it?
 

Mopetar

Diamond Member
Jan 31, 2011
8,463
7,684
136
It's been known for some time that Dalvik isn't the best in terms of performance. My guess is that they probably had to avoid some Oracle patents and that might have hurt performance.
 

Graze

Senior member
Nov 27, 2012
468
1
0
This makes me wonder two things. First, how bad was Dalvik that 2x performance is easily attainable in a still early unoptimized release? And second, for balls sake, how blisteringly fast will todays already crazy fast devices be on it?

Were you one of the engineers working on this for the past two years and is able to state with some definiteness that this performance gain was "easily attainable"?




Edit://It would be stupid to compare Dalvik to a common JVM. But it had to be Oracle to do this of course!
 
Last edited:

teejee

Senior member
Jul 4, 2013
361
199
116
ART runs much closer to native than Dalvik in my understanding. Some light reading:

http://source.android.com/devices/tech/dalvik/art.html

https://docs.google.com/spreadsheet/ccc?key=0AnE-DX9Fbr9KdFZtRlhQaWxmVG5XdDR3TFR1Q3JONnc&usp=sharing#gid=0
(benchmarks here)

http://www.xda-developers.com/android/new-runtime-compiler-in-android-4-4/#comment-1104912482





This makes me wonder two things. First, how bad was Dalvik that 2x performance is easily attainable in a still early unoptimized release? And second, for balls sake, how blisteringly fast will todays already crazy fast devices be on it?

You seem to misunderstand the difference between ART and Dalvik. Dalvik is a JIT (Just-In-Time) compiler, where byte code to native code compilation is done on the fly when running the app.
You have much more possibilities to optimize when doing compilation beforehand without major time constraint (as ART do).

But this is a great improvement for Android, I guess this will become standard in next release of Android (5.0?)
 

Fox5

Diamond Member
Jan 31, 2005
5,957
7
81
Were you one of the engineers working on this for the past two years and is able to state with some definiteness that this performance gain was "easily attainable"?




Edit://It would be stupid to compare Dalvik to a common JVM. But it had to be Oracle to do this of course!

It's also comparing a very old version of Dalvik, Dalvik has improved a lot since Android 2.2