Dalvik virtual machines run much less efficiently than art, which is why Android started using art from 5.0.
What is Dalvik:
Dalvik is a Java virtual machine designed by Google to be used on Android platforms. Dalvik virtual Machine is one of the core components of Android mobile device platform developed by Google and other manufacturers. It can support the operation of a Java application that has been converted to. Dex (that is, Dalvik executable) format, which is a compression format designed for Dalvik and is suitable for systems with limited memory and processor speed. Dalvik is optimized to allow instances of multiple virtual machines to run concurrently in limited memory, and each Dalvik application executes as a standalone Linux process. A standalone process can prevent all programs from shutting down when the virtual machine crashes.
What is art:
The Android operating system is ripe, and Google's Android team is starting to turn its attention to some of the underlying components, one of which is the Dalvik runtime responsible for running the application. Google developers have spent more than two years developing faster, more efficient and more power-saving alternative art runtimes. Art stands for Android Runtime, which handles application execution in a completely different way than Dalvik,dalvik relies on a just-in-time (JIT) compiler to interpret bytecode. Developer-compiled application code requires an interpreter to run on the user's device, which is not efficient, but makes it easier for applications to run on different hardware and architectures. Art has completely changed this approach by pre-compiling bytecode to machine language when the installation is applied, called Ahead-of-time (AOT) compilation. After removing the process of interpreting the code, application execution is more efficient and faster to start.
Art Features:
in the art virtual machine environment, Android only compiles the program once, that is, when the program is installed. When you install an app, the art virtual machine translates the program's Java language into a machine language that works for Android, and it's a compile-time lifetime benefit. This is exempt from each run of the program, the need to recompile the trouble, the system's operational efficiency has been greatly improved.
Art Benefits:
1, the system performance significantly improved.
2. Applications start faster, run faster, experience smoother, and feel more responsive.
3, longer battery life capability.
Art Disadvantages:
1, larger storage space occupancy, may increase by 10%-20%.
2, longer application installation time.
Dalvik and Art