Android ART Runtime

January 3, 2018 Oclemy Virtual Machines 0 minutes, 51 seconds

Android 5.0(Lollipop) and above have been using ART as the main runtime.

ART was introduced experimentally in Android 4.4 KitKat.

Before ART Runtime was DVM(Dalvik Runtime).

ART runtime utilizes AOT(Ahead Of Time) compilation. This compilation model involves optimizing application performance on startup and application execution.

DVM utilizes JIT(Just In Time) compilation model. However, with AOT dex files are compiled during installation.

This compilation is done using the dex2oat tool.

Advantages of AOT Compilation

No. Advantage
1. Removal of delay introduced by JIT compilation during each application execution.This is because Dex2oat will generate system-dependent code for the device it's run on.
2. Reduction in number of processor cycles used by the application.This is because AOT will remove the time the JIT compiler normally uses to convert code into machine format.
3. Reduction in battery power consumption.This is because of the reasons listed above.
4. Improvements in Garbage Collection and memory allocation.This results in more responsive applications.

Disadvantages of AOT compilation

No. Disadvantage
1. Larger memory footprint than JIT and DVM