Dalvik mode
If we want to explain what art is, we need to start with the Android application compilation mode, we all know that Android system is built on the bottom of Linux system, the Android system is open source (source code disclosure), The Android system is bound to fit on devices with different hardware configurations, so Google has built a virtual machine called "Dalvik" on top of Linux to reduce the difficulty of developing applications.
Because of the existence of Dalvik virtual machines, Android developers simply use the SDK (software Development kit) provided by Google to create apps in a set of "rules" without worrying about hardware, drivers, etc. Each time the application is executed, the Dalvik virtual machine compiles the language of the program from a high-level language into a machine language so that the current device can run the application.
Some friends may notice, the author deliberately emphasized the word "every time", the previous Android system for compatibility to make a compromise, in each run of the application needs to be compiled once, so that the execution efficiency of the program greatly reduced.
Art mode
After understanding the Dalvik mode, We need to know about the new Art mode in Android4.4, the full name of this model is androidruntime, in fact, this optimization of Google stems from the acquisition of a company called Flexycore, which has been committed to the optimization of the Android system, and art mode is also in the public Evolution of the Division's Optimization program. The biggest difference between art mode and Dalvik mode is that after enabling art mode, the systempre-compilation is done when the app is installed, when you install the application, youconvert your code to machine language first stored locallySo that it does not compile every time when the program is run and executesThe efficiency is also greatly improved。 In this respect, the art model does improve the compatibility of the Android platform, but on the other hand, the application's pre-compiled capacity, and whether the application is compatible with the model, also needs to be considered.
The similarities and differences between art mode and Dalvik model