jeudi 26 février 2015

Why is Android Runtime's AOT compilation more performant than Dalvik's JIT?


With Android 5.0, Google has introduced the Android Runtime, or ART. ART "brings improvements in performance, garbage collection, applications debugging and profiling." However, it also replaces Dalvik's Just-in-Time compilation with Ahead-of-Time compilation performed by translating the Dalvik bytecode to a native ELF executable at application install time.


My question is: why did Google do this and why is it more performant? I've long been an advocate of native code over managed code, but even so, I thought that JIT'd code could outperform AOT-compiled code in many or perhaps even most situations due to its ability to re-optimize for actual application behavior at runtime.


Are the advantages of AOT specific to Android's implementation or environment (i.e. mobile devices with ARM CPUs and limited RAM), or was JIT just oversold?





Aucun commentaire:

Enregistrer un commentaire