Dynamic compiler for JAVA9 new feature -21-java

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.