ART might become default in next version of Android
One of the relatively unknown features in the Android 4.4 is an optional runtime, called ART aka Android Runtime. Introduced as an experimental feature in KitKat, ART is Google’s upcoming replacement for Dalvik.
According to reports, Google has been working on ART for almost two years and it is finally getting ready for the primetime. Google notes that it is not ready for mass consumption just yet but the company wanted developers and manufacturing partners to get a taste of it and give feedback to Google in case they find any issues.
“ART is a new Android runtime being introduced experimentally in the 4.4 release. This is a preview of work in progress in KitKat that can be turned on in Settings > developer options. This is available for the purpose of obtaining early developer and partner feedback,” Google notes on Android.com.
“It is still a work in progress. We didn’t have to make it available this release, we could’ve kept going on it but I kind of pushed to make it available because I wanted to get it out early. I wanted to get devices manufacturers—especially chipset manufacturers that make different architectures—to play with it and optimize it,” Android head engineer Dave Burke told in an interview with ReadWrite.
What are Dalvik and ART?
As I am not an expert in the nitty-gritties of Android, I will leave the explaining to the experts:
Dalvik is the managed runtime used by applications and some system services on Android. Dalvik was originally created specifically for the Android project. (Source: Android.com, Detailed information on Wiki)
Coming to ART, Android Runtime handles app execution in a fundamentally different way from Dalvik. The current runtime relies on a Just-In-Time (JIT) compiler to interpret bytecode, a generic version of the original application code. In a manner of speaking, apps are only partially compiled by developers, and then the resulting code must go through an interpreter on a user’s device each and every time it is run. The process involves a lot of overhead and isn’t particularly efficient, but the mechanism makes it easy for apps to run on a variety of hardware and architectures. ART is set to change this process by pre-compiling that bytecode into machine language when apps are first installed, turning them into truly native apps. This process is called Ahead-Of-Time (AOT) compilation. By removing the need to spin up a new virtual machine or run interpreted code, startup times can be cut down immensely and ongoing execution will become faster, as well. (Source: Android Police)
When will ART replace Dalvik?
According to Android Head Engineer Dave Burke, ART could be ready for the next release of Android.
“I don’t want to make promises but I imagine next release it could be ready. Maybe. We will switch over when it is ready. It is actually quite fast now and now we are just really optimizing it and assuming those optimizations go well I assume that we will be ready to switch over at the next opportunity,” He told ReadWrite.