It's official: Java 9 will support Ahead-Of-Time (AOT) compilation

http://openjdk.java.net/jeps/295

Reddit discussion: https://www.reddit.com/r/programming/comments/59o6wt/its_official_java_9_will_support_aheadoftime/

Note that this will initially only be limited to 64-bit JVM running on 64-bit Linux and only the java.base module will be fully supported. Regardless this is a great development for Java!

Certainly a good development, however I’m most happy about the fact that it seems to not end up in a commercial feature (like JMC) as it long seemed to be the plan.

PS: here’s another post from Monica https://www.infoq.com/news/2016/10/AOT-HotSpot-OpenJDK-9

Ultimately it’s going to lead to being able to deploy private JVMs with your entire self-contained applications precompiled at the highest Hotspot tier which I should think will lead to very smooth, fast startup. Though this is not really where it’s being aimed… it’s like they still cling to this concept of a “system JVM” as being something good that people want or need. Except it isn’t.

Excelsior JET is still the go-to for AOT compilation, and with good reason… they’ve been developing it for 20 years.

Cas :slight_smile:

I think Excelsior has a different approach. Excelsior precompiles your application into native code and embeds the JVM / GC system. The AOT compiler Oracle is working on, at least for now, seems to aim mainly for extremely fast startup and maybe, at a later stage, some stored runtime performance information for great runtime speed from the start. Still Hotspot will be able to recompile / optimize the Java code at runtime, just the way we have today. The beauty of this over Excelsior is that your application still gets optimized at runtime and brings the best performance just as we know today.

According to the updated JEP you can choose the compilation level…so already have profile guided at AOT.

Except that Jet code is basically as fast as the server VM from the getgo without any further optimisation needed…

Cas :slight_smile:

It can’t be as fast as code that is not executed will be eliminated which means code branches might disappear and code gets inlined, but yeah it is as fast as C2 with common ideas about the code paths ;D

PS: Excelsior is awesome when it comes to precompiling, don’t get me wrong :slight_smile: