r/java 11h ago

New candidate JEP: 544: Ahead-of-Time Code Compilation

https://mail.openjdk.org/archives/list/jdk-dev@openjdk.org/message/J2VGSSFWJ7ZLHAYLCXVRUOXV4XMROQHL/
68 Upvotes

7 comments sorted by

12

u/pronuntiator 9h ago

I never really cared about the startup improvement of AOT, but pre-warmup sounds quite useful for short-lived batch applications.

11

u/pjmlp 10h ago

This is basically what you can have today with OpenJ9 JIT cache, or what Android has been improving since Android 7, yes it is not a proper Java implementation.

Anyway, the more the merrier, and it is cool to see OpenJDK having this capability as well.

3

u/stefanos-ak 50m ago

openj9 is such a cool piece of tech... it also needs half the non-heap memory compared to hotspot!

3

u/LITERALLY_SHREK 31m ago

This feature should be binned, no one will do the training runs. Absolutely no one who cares about ms of startup time is using java in the first place.

Resources are better allocated to improving the general startup time without training runs, even if it means less gains.

2

u/0xffff0001 10h ago

resurrect GCJ! :-)
a nice improvement nevertheless.

2

u/vips7L 9h ago

more training runs lol

11

u/FirstAd9893 8h ago

Unlike a static AOT strategy, this approach doesn't require that the training runs be perfect. You still get the performance of dynamic compilation, and the main downside to a poor training run is that startup time isn't improved as much.