[Vm-dev] Dalvik vs. ART: Android virtual machines and the battle for better performance | Pocketnow

tim Rowledge tim at rowledge.org
Fri Dec 13 03:31:41 UTC 2013

On 12-12-2013, at 1:08 PM, phil at highoctane.be wrote:

> http://m.pocketnow.com/2013/11/13/dalvik-vs-art

What goes around, comes around I guess. This AOT stuff was proposed many years ago in an ACM journal; distribute code as something like source, process it on each machine at install, load, or early run time. The argument was that machines were by then fast enough that somewhat pre-digested source could be locally polished & ready to run without bothering the user.

I’ve argued for a related idea in our vm on a few occasions, ie keeping the translated code along with each method and saving it  in the image, with obvious requirements for flushing the cached stuff if the image starts up on a different architecture. Another idea was to have a HonkinBigServer somewhere on the net that would deliver the digested versions of methods to a system a bit like Spoon, allowing even dinky machines to benefit. Assuming they had tolerable network access of course.

JIT compiling has the advantage that only what you actually run gets processed, but you lose the processed stuff on occasion (cache over fill, image startup, etc). Pre-processing means dealing with all the code, costing processing time, space, but saving run time, usually. I suspect a mix would provide a configurable mix of benefits that might be best.

Of course, the first thing that happens when a system gets faster or bigger is that some fool comes along and uses O(n^3) algorithms to replace some nice fast O(n) code.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
loggerheads - lumberjack sniffing addicts

More information about the Vm-dev mailing list