Some benchmarks for those interested
| Java | Notes |
|---|---|
| GraalVM Java 24 | Best performance and Generational ZGC support |
NOTE: Running 1.16.5 with Java versions newer than 8 is only possible with ModernFix' JVM arguments. Not all mods may work though, so if you find an incompatible one, switch back to Java 8.
| Java | Notes |
|---|---|
| GraalVM Java 21 | Best raw performance, shortest loading times |
| Adoptium Java 21 | Generational ZGC support (greatly reduces stutters but requires more RAM) |
| Adoptium Java 8 | Best mod compatibility |
NOTE: Running 1.12.2 with Java versions newer than 8 is only possible with Cleanroom Loader. If you find a mod that doesn't work with it, report it to their issue tracker.
| Java | Notes |
|---|---|
| GraalVM Java 24 | Best performance and Generational ZGC support |
NOTE: Running 1.7.10 with Java versions newer than 8 is only possible with LWJGL3ify.
| Java | Notes |
|---|---|
| GraalVM Java 24 | Best performance and Generational ZGC support |
If you're on a version which supports Java 21 (or newer) and your PC has at least 16 GB of RAM, I'd recommend Adoptium JDK 21 with these args:
-XX:+UseZGC -XX:+ZGenerational
Java 23 and newer only need -XX:+UseZGC, since it's generational by default.
If you are on a system with less than 6 cores and have 8 GB of total system RAM or less, I wouldn't recommend using ZGC.
Java 24 and newer support compact object headers, which can improve performance. You can enable them with these args:
-XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders