Microsoft Build of OpenJDK, the vendor's open source distribution of Java, has added an experimental feature to improve escape analysis compiler optimisation results.
With a patch and security update issued October 24 and dubbed the October 2022 PSU release, Microsoft seeks to improve escape analysis results by increasing the number of opportunities for scalar replacement.
In compiler optimisation, escape analysis is an algorithm that determines the dynamic scope of pointers, or where in the program a pointer can be accessed.
With scalar replacement, the Java just-in-time compiler can allocate the members, or scalars, of an object on the stack or in registers, rather than allocating the full object on the heap. This reduces stress on garbage collection.
The goal of the new escape analysis enhancement is to simplify object allocation merges in order to promote scalar replacement of the objects involved in the merge. A simpler version of this enhancement was featured in Java Development Kit (JDK) 11, while a version exploiting more opportunities was included in JDK 17, Microsoft said.
Updates can be found here for OpenJDK 11 and here for OpenJDK 17. Downloads of Microsoft Build of OpenJDK, which is available for Windows, Linux, or macOS, can be found at learn.microsoft.com. Starting with this release, developers can see exact changes made to the builds by inspecting source code in newly established Microsoft repositories on GitHub, at jdk17u and jdk11u.
Microsoft has updated container images and includes the Microsoft CBL-Mariner 2.0 Linux distribution as well as OpenJDK 8 images based on CBL-Mariner with Eclipse Temurin binaries. Microsoft said that Azul Zulu for Azure Builds of OpenJDK are no longer supported and no longer updated.