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.
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.