r/java • u/sureshg • Sep 10 '26
New candidate JEP: 544: Ahead-of-Time Code Compilation
https://mail.openjdk.org/archives/list/jdk-dev@openjdk.org/message/J2VGSSFWJ7ZLHAYLCXVRUOXV4XMROQHL/
110
Upvotes
View all comments
Show parent comment
1
u/pjmlp Sep 14 '26 edited Sep 14 '26
Like OpenJ9 and ART do, by updating the cache dynamically after each execution.
ART then goes one step further and AOT compiles with higher level optimizations only the code paths that landed on the cache, when the device is idle charging. Additionally thanks to the PlayStore, compilation metadata gets shared across devices, so that not every single device has to do their training runs individually.
As a developer you can naturally do you training runs ahead of time instead of letting OpenJ9 or ART perform them, and ship the archive alongside the application, it is nonetheless optional.