1. Official feature
243:java-level JVM Compiler Interface
295:ahead-of-time compilation
2. Creating a background
Oracle has been working to improve Java startup and runtime performance, in the hope that it can achieve or approach the performance of the local language in a wider range of scenarios. However, until today, when it comes to Java, many C + + developers will disdain to evaluate the slow start and eat memory.
Simply put, this is mainly because the Java compiler produces a class file that the Java Virtual machine can understand the binary code, rather than the actual executable native code, requires the Java virtual machine to interpret and compile, which brings additional overhead.
3. Instructions for use
The JIT (just-in-time) compiler can compile the hot spot at run time with cost-code, fast. But the Java project is now very large and complex, so the JIT compiler takes a long time to warm up, and some Java methods do not compile and performance degrades. AoT compilation is meant to solve these problems.
In JDK 9, theAOT(JEP 295:ahead-of-time Compilation) is introduced as an experimental feature, and developers can use the new JAOTC tool to convert the key code into a similar library-like file. While still in the experimental phase, this feature allows Java applications to compile Java classes into native code before being started by a virtual machine. This feature is designed to improve startup time for small and large applications while having minimal impact on peak performance.
But Dmitry Leskov, marketing Director of Java technology provider Excelsior, is concerned that AOT-compilation technology is not mature enough to allow Oracle to wait until a more stable version of JAVA10 is released.
In addition Jvmci (JEP 243:java-level JVM Compiler Interface) and other characteristics, for the development of the entire programming language, may have very important significance, although not necessarily cause wide attention. Now that the Graal Core API has been integrated into Java 9, although it is only a small step, a reliable, high-performance dynamic compiler that is fully implemented in the Java language seems no longer unreachable, a boon for Java virtual machine development engineers.
At the same time, with the development of the truffle framework and substrate VMS, the individual confident engineers chanted "one VM to Rule them all!", perhaps Ploygot in an alternative way in the near future.
Still Silicon Valley interviewer Song Hongkang
Links: https://www.jianshu.com/p/415ebd959872
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
Dynamic compiler for JAVA9 new feature -21-java