Ahead-of-time compiler

from Wikipedia, the free encyclopedia

An ahead-of-time compiler ( AOT compiler ) is a compiler that, unlike just-in-time compilers (JIT compilers), translates program code (long) before execution (and independently of it) into native machine language . This has the advantage that this code is started much faster at runtime (ie the initialization time is shorter) than with a JIT compiler, since the translation has already been carried out.

The main disadvantage of an AOT compiler is that the code generated is no longer platform-independent , as is usually the case with JIT compilers. AOT compiler are conventional compiler how they heard of C were used. But AOT compilers are usually also available for languages ​​that normally work with JIT compilers (e.g. Java ). Possibly. the compiler can use the intermediate code (bytecode) as input instead of the source code, which saves you from having to maintain components twice (e.g. syntax analysis ).

Java

With JEP 295 ("JDK Enhancement Proposal", extension proposals for the Java Development Kit ), the optional AOT compilation with Java 9 was introduced in 2016, initially for restricted parts of the Java platform . However, this feature is still to be regarded as experimental (as of 2019).

See also

Individual evidence

  1. Michael Krimgen: Ahead of Time Compilation (AoT). February 18, 2019, accessed December 7, 2019 (American English).