
The first thing to be sure of when measuring performance is to ensure the JVM is using the GraalVM Enterprise compiler. It can be disabled with -XX:-UseJVMCINativeLibrary. Therefore it has execution properties similar to other native HotSpot compilers such as C1 and C2.Ĭurrently, this is the default mode of operation. In this mode, the compiler uses memory separate from the HotSpot heap, and it runs compiled from the start. That means the GraalVM Enterprise compiler is deployed as a native shared library. To address the issue of taking longer to reach to peak performance, libgraal was introduced – a shared library, produced using Native Image to ahead-of-time compile the compiler itself. This can translate into slightly longer times until the application reaches peak performance when compared to the native compilers in the JVM such as C1 and C2. That is, it is first interpreted before its hot methods are compiled. When running the GraalVM compiler on the JVM, it goes through the same warm-up phase that the rest of the Java application does. Running the GraalVM Compiler in Native Image vs on the JVM #
