Posts

Showing posts with the label Android RunTime

ART or Dalvik? Which one is better?

ART (Android RunTime) is the next version of Dalvik. Dalvik is the runtime, bytecode, and VM used by the Android system for running Android applications. ART has two main features compared to Dalvik: Ahead-of-Time (AOT) compilation, which improves speed (particularly start-up time) and reduces memory footprint (no JIT). Improved Garbage Collection (GC). An ahead-of-time (AOT) compiler is a compiler that implements ahead-of-time compilation. This refers to the act of compiling an intermediate language, such as Java bytecode, into a system-dependent binary. Hence your apps are compiled to native code once, and stored on your device to run effectively as native. This differs from the traditional VM model, which interprets bytecode. Interpreters are slow, so VM developers added a technology called Just-in-Time (JIT) compilation, which compiles (and hopefully optimizes) your code to native code on-the-fly. Dalvik is a JIT'ing VM. The downside to JIT is that the JIT compiler ...