In Android 4.4 Kitkat, Google introduced a run-time environment ART, though ART is experimental, It hints that Google might completely replace its current run-time Dalvik. This option is available in developer options of Android in Kitkat. There are many pros and cons of ART run-time, and it is still in working, but in future versions of Android, this might replace Dalvik run-time completely.
Let’s see what is ART, and how it is different from Dalvik and how does ART affects Android experience.
What is ART and Dalvik
Dalvik and ART are virtual machines. Virtual machines emulates the computer architecture or functions of real computer hardware. It means that virtual machines allow an application to run on any hardware platform acting as interface between them.
Dalvik is based on JIT (Just in Time) compilation. JIT (hence Dalvik Virtual machine) compiles a small part of code and require less memory. The code compiles every time you run an app and hence adds to the lag while the app starts.
ART is based on AOT (Ahead of Time) compilation. In ART, the code compiles during installation to system dependent language and hence it doesn’t needs to get compiled again and again when user opens an app.
Why is Google thinking about ART as future Runtime?
There are many reasons why Google is working on ART :
1. Since the code is precompiled once during installation, It doesn’t need to be recompiled again while opening an app, hence lag is reduced while opening of an app.
2. Speed increase while using multiple apps and multitasking.
3. Saves CPU cycles and hence saves battery because CPU doesn’t need to recompile an app again and again,
4. Increase speed in RAM and storage usage.
Cons of ART:
1. The app installation takes more time.
2. The app takes much more space than using Dalvik runtime.
3. Since ART is currently an experiment, most of the apps crash or don’t work with ART.
4. CPU integer operations are better on Dalvik.
Why Google didn’t introduce it before?
When Google unveiled the first Android smartphone in 2008, the hardware, storage and memory technology for smartphone was not as advanced as it is today. The storage and memory were less, the smartphone processor was not as powerful as it is today with multi-core processors. On ART an app itself requires much more space than on Dalvik, hence Google dropped the idea of ART.
What is the future of ART?
Google has introduced the option to switch on ART with Android Kitkat, the project is now experimental but the advantages of ART clearly indicates that future Android versions will come with ART runtime once it becomes stable and developers start supporting it.
Hope you enjoyed this post, share it with friends and stay subscribed to thetecnica for interesting news on Social media, gadgets and mobiles.
Image Courtesy: Android Authority