SIMD does not support Java 21
Huge-mistake opened this issue · 15 comments
Java21 is the LTS version, the official version has been released recently, can pufferfish adapt to make Java 21 support SIMD
SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19
Why not just change it to 'SIMDDetection.getJavaVersion() < 17'?
That has been explained a bunch in the past, yeah it happened that this was incubator. The API behavior was subject to change, so if a change was made, it could theoretically cause the calls to not be inlined and vectorized (and the vectorization would be emulated with for loops) which would absolutely tank performance.
Now that it's out of incubator we can swap out all of the packages here and we'll be good basically forever.
I hope to resolve this in pufferfish 1.20.2.
@kev626 Will this take long because there are a lot of things that need to change?
Java 21 is the latest LTS version and Paper's recommended Java version.
https://docs.papermc.io/misc/java-install
This will be added shortly, we're quite bogged down with some stuff right now, but it is on our radar.
This will be added shortly, we're quite bogged down with some stuff right now, but it is on our radar.
Thanks for your response. I thought supporting Java 21 would be as simple as changing SIMDDetection.getJavaVersion() < 17
, but I guess not.
This will be added shortly, we're quite bogged down with some stuff right now, but it is on our radar.
Hello @kev626, any news about this please ?
It's easy. I couldn't find any difference in jdk.incubator.vector.*
between Java 19 and 21.
I'm pretty sure Kevin didn't check for Java 21 and forgot about this issue.
if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19)
↓
if (SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21)
SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19;
↓
SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21;
It's easy. I couldn't find any difference in
jdk.incubator.vector.*
between Java 19 and 21. I'm pretty sure Kevin didn't check for Java 21 and forgot about this issue.if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19)
↓
if (SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21)
SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19;
↓
SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21;
Has this been tested
Has this been tested
Yes I have tested it and am using it with Java 21.
@kev626 Java 21 is the latest LTS. I am waiting for this.
Are there any updates? As far as I read this chat, it should be safe to implement and java 21 is LTS so it should be supported!
This will be implemented with 1.20.6