With the newly released version 22.0 of the Oracle-developed GraalVM polyglot runtime, the open source project’s developers aimed to improve the developer experience.
Released January 24 for JDK 11 and JDK 17, the most-current long-term support releases of standard Java, GraalVM 22.0 Community Edition can be downloaded from GitHub. Enterprise builds of GraalVM 22.0 are available from Oracle.
A key focus of the release is GraalVM’s Native Image technology, which compiles Java code ahead-of-time into stand-alone executables, with multiple programming languages supported. To make life easier for developers, the developers of GraalVM have worked to reduce image build times and memory usage over the past few releases.
In GraalVM 22.0, changes were made to reduce image size, using a more compressed encoding method for stack frame metadata to reduce the size of all images. In the GraalVM Enterprise edition, an optimised implementation of
String.format() goes even further, providing the option of making localisation classes unreachable to significantly reduce image size.
GraalVM 22.0 also changes the build output for Native Image, which now breaks down the build process into stages and visualises the current stage, showing code and heap breakdowns and statistics of the build. In addition, Native Build Tools technology for GraalVM was fitted with improvements such as better integration with the native agent.
GraalVM 22.0 also changes the way the compiler treats profiling information. Designed as an optimising JIT compiler, the compiler can switch to an AOT (ahead of time) mode, where major optimisations can perform a reasonable job even in the absence of profiles. This helps Truffle languages in cases where unprofiled patterns become hot, and in Native Image without profile-guided optimisations.
Other improvements in GraalVM 22.0:
- For Java and the compiler, a new loop rotation optimisation converts uncounted loops to counted ones to benefit from optimisations such as vectorisation and partial unrolling. This optimisation is disabled by default.
- In the Enterprise edition, polyglot isolates and other features enable heap isolation between the host and guest applications. Isolates improve startup, security, and warmup times for Truffle languages.
- ECMAScript 2022 mode is enabled by default.
- The WebAssembly runtime now uses the Truffle Frame API.
- For Python, GraalVM builders continue to work on compatibility of the GraalVM Python runtime and extending module support, with support added for
- Ruby 3.0 support was added. Also, Ruby interpretation is faster.