*** Welcome to piglix ***

Ahead-of-time optimization


In computer science, ahead-of-time (AOT) compilation is the act of compiling a higher-level programming language such as C or C++, or an intermediate representation such as Java bytecode or .NET Framework Common Intermediate Language (CIL) code, into a native (system-dependent) machine code so that the resulting binary file can execute natively.

AOT produces machine optimized code, just like a standard native compiler. The difference is that AOT transforms the bytecode of an extant virtual machine (VM) into machine code.

Some programming languages with a managed code runtime that can be compiled to an intermediate representation, use just-in-time (JIT) compiling. This, briefly, compiles intermediate code into machine code for a native run while the intermediate code is executing, which may slow an application's performance. Ahead-of-time compiling eliminates the need for this step by occurring before execution rather than during execution.

Ahead-of-time compiling for dynamically typed languages to native machine code or other static VM bytecode is possible in a limited number of cases only. For example, the High Performance Erlang Project (HiPE) AOT compiler for the language Erlang can do this because of advanced static type reconstruction techniques and type speculations.

In most situations with fully AOT compiled programs and libraries, it is possible to drop a useful fraction of a runtime environment, thus saving disk space, memory, battery life, and startup times (no JIT warmup phase), etc. Because of this, it can be useful in embedded or mobile devices.


...
Wikipedia

...