26 ms·
Neither is wrong, and there's very likely a lot of low hanging JVM performance fruit here still to claim. Right now they're in a bit of a transitional period.
by mike_hearn 3y ago
Neither is wrong, and there's very likely a lot of low hanging JVM performance fruit here still to claim.
Right now they're in a bit of a transitional period. Since a few weeks ago the most obvious thing to try is using the latest Oracle GraalVM with ZGC. ZGC is a pauseless GC like Shenandoah and the Graal compiler is a lot better at escape analysis and removing allocations than the stock C2 compiler especially now Oracle made the enterprise compiler free to use.
The main problem is going to be that ZGC Generational is not quite launched yet. Without generational GC it may not be able to keep up with those very high allocation rates, even with a better compiler reducing them down again. Generational ZGC should be in Java 21 but then you'd have to wait for GraalVM to catch up. So, probably it's worth trying that combination in the next six months or so.
Whilst I don't know about ZGC vs Shenandoah, the performance improvements from using Graal EE over C2 can be large even for Java (the wins are much bigger still for other higher level/more dynamic languages). But the Minecraft community isn't really known for adopting the latest JVM tech. They're pretty conservative.
Edit: someone downthread linked to https://github.com/brucethemoose/Minecraft-Performance-Flags-Benchmarks https://github.com/brucethemoose/Minecraft-Performance-Flags... which talks about all of that so I guess they're getting more experimental!