r/java • • Sep 21 '26

JEP 544: Ahead-of-Time Code Compilation targets JDK 28

https://openjdk.org/jeps/544

JEP 544: Ahead-of-Time Code Compilation targets JDK 28

78 Upvotes

12 comments sorted by

View all comments

Show parent comment

16

u/JacobJMountain Sep 21 '26

More similar to the CDS / AOT caches that already exist. you’ll build a cache in a training run (like you already could do) except now you’ll be able to store native code for that specific architecture in there too. This should mean your code will start faster, and then if/when the JIT compiler decides it wants to swap out the native code for some reason it can do so

4

u/pjmlp Sep 22 '26

With the big difference that the AOT caches that already exist in other JVM implementations don't require training runs.

They support them naturally, however they can also start with an empty cache, and keep updating it across executions.

Examples Open J9, ART (even if it isn't proper Java), Azul ReadyNow, and I assume PTC and Aicas also have something similar.