You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the people working on the Java Vector API appear to have assumed that instructions like vpshufb or vtbl were of secondary importance and did not need to be exposed to the programmer. I believe that it is a mistake.
The C# approach is quite different. In .NET 8, you have Ssse3.Shuffle or AdvSimd.Arm64.VectorTableLookup for example.
BTW I ported the algorithm to C#, I am about the make it public. The .NET library has already a very fast UTF-8 validation function (it is internal but we can get at it with copy-paste). As you can see, I get about 25 GB/s per second on Twitter.json. It wasn't more difficult that the work you did.
This Java code can be 'fast' but not nearly at the speed of a C implementation.
I believe that the reason is this code section:
At a glance,
selectFrom
looks like a standard vectorized table lookup likevpshufb
orvtbl
. But I think it is not, unfortunately. It appears to generate a long flow of instructions.So the people working on the Java Vector API appear to have assumed that instructions like
vpshufb
orvtbl
were of secondary importance and did not need to be exposed to the programmer. I believe that it is a mistake.The C# approach is quite different. In .NET 8, you have
Ssse3.Shuffle
orAdvSimd.Arm64.VectorTableLookup
for example.See https://mail.openjdk.org/pipermail/panama-dev/2024-June/020476.html
The text was updated successfully, but these errors were encountered: