Skip to content
Tech News
← Back to articles

JEP 544: Ahead-of-Time Code Compilation

read original get Effective Java (3rd Edition) by Joshua Bloch → more articles
Why This Matters

JEP 544 brings ahead-of-time compiled native code into the HotSpot JVM's AOT cache, so Java applications can hit peak performance almost immediately instead of waiting through a JIT warmup period. Crucially, it requires no changes to application, library, or framework code and keeps JIT compilation in play, so workloads that shift in production still get re-optimized. That makes Java more competitive for short-lived, serverless, and rapidly scaled cloud workloads without forcing developers into a separate native-image toolchain.

Key Takeaways
Worth a Look

Effective Java (3rd Edition) by Joshua Bloch — If JEP 544's AOT caching has you thinking about how the JVM actually runs your code, Bloch's Effective Java is the classic companion for writing Java that holds up under real workloads. It's packed with practical items on generics, lambdas, streams and performance-minded design straight from a longtime JDK architect.

See Effective Java (3rd Edition) by Joshua Bloch on Amazon → Affiliate link — we may earn a commission on purchases, at no extra cost to you. Product picked by AI based on this article; it is not a tested recommendation.

Summary

Improve startup and warmup time by making optimized native code for an application instantly available when the HotSpot Java Virtual Machine starts. Achieve this by compiling application code to native code in a training run, storing the native code in the AOT cache for use in subsequent production runs. If the workload changes in production, regenerate native code dynamically for continued peak performance, providing the best of both ahead-of-time (AOT) and just-in-time (JIT) compilation.

Goals

Enable applications to achieve peak performance more quickly.

Enable applications to sustain peak performance even as workloads change.

Do not require any change to the code of applications, libraries, or frameworks.

Do not require any change to the configuration of HotSpot, beyond requesting the use of the AOT cache.

Continue to support the Serial, Parallel, G1, and ZGC garbage collectors.

Do not introduce new AOT workflows, but, rather, extend the existing AOT cache creation workflow.

Ensure that shifting from AOT-compiled code to JIT-compiled code is invisible to applications.

... continue reading