Dalvik and Art

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.