Wednesday, June 25, 2014
Android ART vs Dalvik
I will confess that I am an old school big iron dinosaur. As such, I am prejudiced toward ahead of time compiled executables vs just in time compilers. Admittedly part of that prejudice is because back in the day it took several minutes to hours to compile a program. Even low level assembler code took time to assemble and link. There was no way we would compile or assemble our code every time we wanted to execute it. I realize that languages, compilers, hardware and everything else have changed. Still, in my view it has to be better and faster to invoke an executable module rather than code that has to go through a compile step before the device knows what to do with it. I also assumed that already compiled programs would be smaller than code that still needed compiling. I have not checked this.
So, what's my take on ART vs Dalvik? I switched to ART months ago. I switched for the reason mentioned above plus I tend, and like, to try new stuff. I almost immediately noticed that it took longer to install or update apps. That is not a big deal. Unless you are updating several apps and need the full resources of your device immediately. I have noticed that when upgrading Android OS that it takes much longer for the "optimizing apps" step. I've gone through two upgrades since switching to ART. This too is not a big deal. How often do you upgrade Android releases?
The one thing that bothers me is that, at least at this point, the ART option does not seem any faster at run time. Maybe this is because ART is not as mature as Dalvik. It doesn't seem to matter though since Google is slowly eliminating Dalvik, so ART better get better.
I will always try the new stuff and will usually let my prejudices/experience prevail. With the technology we have now, already compiled should always beat not yet compiled. Unfortunately the difference is negligible or non existent at this point. At least to old human eyes on a Nexus 7 (2013).
I'd be interested in hearing from real world folks who have gone through this change. Any significant improvements or degradation with ART?