Since Android was born, it has been working on Dalvik which lets applications run on all the devices with different processors and RAM. Android team has hardly put any efforts to improve it apart from optimizing it to make it portable. Dalvik is really old now so the developers thought it was better to make a new one instead of updating or improving Dalvik. Now, Google has come up with a new standard ART (Android Run Time) which will help Android apps run faster and smoother than before.
Android applications are written in a programming language called Java and compiled in byte code. Developers submit that code to the Google play store and byte code is transferred from Java Virtual Machine file to Dalvik executable file. Dalvik converts byte code to machine code with JIT (Just In Time) compiler to make an app ready to run.
Why not Dalvik anymore?
Now that the app is ready to download, let us see what happens after we download the app. Each time we open the application, all the parts of our phone that contribute on running the app will struggle to put the code together so that an app can run on your device successfully. If you close the app, all those parts of the phone will take rest. This decreases the speed of an app. In order to increase this speed, Google has come up with new standard called ART (Android Run Time).
ART (Android Runtime)
It has been found out that Google has been working on ART secretly since over two years. As we know by now that Google has come up with ART (Android Run Time) to optimize user experience. So, now let us see how does ART manage to do that. Just like Dalvik converts the byte code into machine code through Just In Time compiler (JIT), ART does that converts the code through Ahead Of Time compiler (AOT). It works same as web browser that pre caches websites so that they load faster.
AOT compiles the code when the application is downloaded so it occupies more memory. Although this is a disadvantage, but there is a positive side too which lets apps open faster and run smoother. It has reduced the execution time of an app to more than half than in Dalvik runtime. This will help in finishing the tasks faster and will give the system more free time to rest.
Android Runtime is ready and available as a developer setting with the devices running on Android 4.4 KitKat. Normal users will not come to know the difference but developers can probably notice it. They advice to keep Dalvik as well as ART, both of them as of now because ART is not yet flawless and might crash your application as well as device.
According to the Google’s Android application developers, for now, for the devices having Dalvik runtime as well as ART, both should run and Dalvik should be the default runtime or else it will break your Android implementations. This will remain at least till developers optimize ART to the level where in it has no issues.