HeadlinesBriefing favicon HeadlinesBriefing.com

JEP 544 : Compilation à l'avance du code

Hacker News •
×

JEP 544 improves Java application startup and warmup time by making optimized native code instantly available when the HotSpot JVM starts. It compiles application code to native code during a training run, storing it in the AOT cache for use in subsequent production runs. If workloads change in production, native code is dynamically regenerated to maintain peak performance, combining the benefits of ahead-of-time (AOT) and just-in-time (JIT) compilation.

The goal is to enable applications to achieve and sustain peak performance more quickly without requiring changes to application code, libraries, frameworks, or HotSpot configuration beyond requesting the AOT cache. It continues to support Serial, Parallel, G1, and ZGC garbage collectors and extends the existing AOT cache creation workflow without introducing new AOT workflows. The transition between AOT-compiled and JIT-compiled code is invisible to applications.

Support is targeted for AArch64 and x64 processor architectures. Non-goals include providing an AOT-only mode, supporting cross-compilation, or supporting all CPU architectures currently supported by HotSpot—normal porting efforts are expected to add support for major architectures over time. The proposal addresses the three-phase execution of Java applications (startup, warmup, peak performance) and aims to reduce the performance cost of profiling and native code generation during warmup by pre-compiling hot methods via the C2 compiler in a training run, ensuring optimized code is available immediately in production.