Hacker News new | ask | show | jobs
by Kipters 1121 days ago
I think he's referring to something similar to what .NET has been doing in the last few versions. They introduced a new Vector API that abstracts platform-specific SIMD instructions. The end result is the same, code using Vector128 will be directly compiled to equivalent AVX opcodes on x86/x64 and NEON on ARM* as if you would have written that directly, except that now you can add these kinds of optimizations across many architectures with a single codebase

This [0] post by Stephen Toub goes in GREAT detail on that

[0]: https://devblogs.microsoft.com/dotnet/performance_improvemen...

*I may get vector length wrong, but you get the idea

1 comments

You can just look up the IntVector API in the docs and see that there's no method corresponding to VCOMPRESSPS or whatever.
You mean this IntVector[0], which I assume is the Java experimental API anthony88 was referring to, correct? If that operation being missing is a blocker, I feel there may be some middle ground other than implementing the whole thing in C++ (like adding it or fast tracking work on this API)

[0]: https://docs.oracle.com/en/java/javase/19/docs/api/jdk.incub...

The compress operation being missing is not a blocker, since the compress operation is not missing: https://docs.oracle.com/en/java/javase/19/docs/api/jdk.incub...
I don't get the other user's point then
The user didn't have a point, they just made something up about an API that they know nothing about.
Hello, thanks for pointing out that I missed this one. It looks like the methods exposed may be sufficient for implementing a sort. I also looked for vpalignr and vpshufb which seem to be missing, but I'm open to the possibility that I have missed these as well.