GraalVM 21.1 features smaller downloads, performance tweaks, Java 16

The GraalVM 21.1 release of the high-performance Java environment is now available, bringing experimental support for Java 16 and compiler updates to improve performance.

GraalVM is a Java runtime that provides significant improvements in application performance and efficiency, making it suitable for microservices or containers.

The latest release has introduced new experimental binaries based on JDK 16 for both Enterprise and Community editions based on JDK 16.0.1. According to the GraalVM team blog, the experimental status means that all components in the JDK 16 based binaries are considered experimental, regardless what their status is in other distribution versions.

The OpenJDK release that GraalVM Community Edition for GraalVM 21.1 is built on was updated to 8u292 for Java 8, 11.0.11 for Java 11, and 16.0.1 for Java 16. The Oracle JDK release that GraalVM Enterprise Edition is built on was updated to 8u291 for Java 8, 11.0.11 for Java 11, and 16.0.1 for Java 16.

One significant change regarding Node in GraalVM is that as of this release, Node.js support is no longer included in the base GraalVM download, but must be downloaded and installed separately. JavaScript support continues to be a part of the base download, according to the GraalVM team, it is only the Node.js that is now a separate download, for speed and clarity and to reduce the size of the base GraalVM download. For GraalVM 21.1, Node.js has been updated to 14.16.1, which is recommended for most users.

On the compiler side, there were two notable improvements. One new optimisation has eliminated unneeded memory barriers on sequential volatile writes on x86 processors. Numerous volatile writes sometimes occur in a sequence after the code has been inlined, according to the GraalVM team, but the GraalVM compiler now omits the memory barrier for all but the last write in the sequence, which speeds up some methods.

The other improvement has eliminated the cast of the loaded array element to Node, preventing a situation when volatile fields are loading from arrays, losing type information about the element, and resulting in unneeded casts. GraalVM 21.1 has also added support for multiple locales in Native Image, allowing the developer to specify at build time which locales should be included in the generated executable.

For a full list of all the changes in GraalVM 21.1, check out the Release Notes.