We've been lining up some really nice performance improvements in the OpenJDK recently.

One of my favorites in the last few months is https://bugs.openjdk.org/browse/JDK-8297933 by Roland Westrelin (Red Hat). This has been seen to improve scores on entire benchmarks by double digits or even integer factors. Seems to be in a reasonably good state since 21 EA build 5.

[JDK-8297933] [REDO] Compiler should only use verified interface types for optimization - Java Bug System

@cl4es Nice! If you combine that with https://github.com/openjdk/jdk/pull/12528 you linked earlier - these alone are worthy ‘upgrade now’ changes.
8302163: Speed up various String comparison methods with ArraysSupport.mismatch by cl4es · Pull Request #12528 · openjdk/jdk

We can improve various String methods such as startsWith, endsWith and regionMatches by leveraging the intrinsified mismatch methods in ArraysSupport. Progress Change must be properly reviewed ...

GitHub
@talios that's a nice one, too, but more of a point fix to a few methods that should only rarely be a bottleneck. Do enough 40x point fixes and maybe we'll soon see real performance gains on real apps, though!
@cl4es Giving it a try with some measurements right now.

@cl4es 21.EA.9 seems to be about 3.5% faster for me than 17.0.6.

I have seen one data set that shows even 7% better performance. I'm not sure about the origin, of course.

@reneschwietzke nice! we also seem to be on a good trajectory since 11 here.

The difference between 17.0.6 and 21 might be smaller than most think, seeing that it's "only" a bit in excess of 1.5 years of development so far -- and several of the performance improvements implemented in that time frame have been backported.

@cl4es Understood. It is also important to note that this example is computational heavy. A typical microservice implementation might not see a thing.

In a previous example (same test and machine type) I have seen 19 and 20 being slower than 17.