The second characteristic, late barrier expansion, is meant to simplify the implementation of G1’s limitations. The rubbish collector’s limitations file details about software reminiscence accesses, by shifting their enlargement from early within the C2 compilation pipeline to later. Objectives embody lowering the execution time of C2 compilation when utilizing the G1 collector, making G1 limitations understandable to HotSpot builders who lack a deep understanding of C2, and guaranteeing that C2 preserves invariants in regards to the relative ordering of reminiscence accesses, safepoints, and limitations. A fourth characteristic is preserving the standard of C2-generated JIT (just-in-time)-compiled code, when it comes to pace and measurement.
Extra options concentrating on JDK 24 shall be decided through the subsequent a number of months. Potential Java 24 options embody additional previews or remaining releases of options being previewed in JDK 23. These embody the class-file API, for parsing, producing, and reworking Java class information; stream gatherers, to reinforce the stream API for customized intermediate operations; module import declarations, for succinctly importing all packages exported by a module and simplifying reuse of modular libraries; structured concurrency, to simplify concurrent programming; scoped values, for sharing immutable knowledge; and flexible constructor bodies, giving builders better freedom to precise habits of constructors.
One other characteristic in preview in JDK 23 and a contender for JDK 24 is primitive types in patterns, instanceof, and switch, which goals to reinforce sample matching by permitting primitive kind patterns in all sample contexts, and to increase instanceof
and change
to work with all primitive varieties. One other doable JDK 24 characteristic is the vector API, now in an eighth incubation stage in JDK 23. The vector API is geared to expressing vector computations that reliably categorical at runtime to optimum vector directions on supported CPU architectures. Ahead-of-time class loading, a characteristic designed to hurry Java startups, and string templates, a characteristic previewed in JDK 21 and JDK 22 however dropped from JDK 23, may be focused to JDK 24.