-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arm64: Use VectorTableLookup/VectorTableLookupExtension APIs in libraries #84328
Comments
Tagging subscribers to this area: @dotnet/area-system-runtime Issue Details#80297 added support for Arm64's
|
Looking through the libraries the current uses of shuffle/vectortablelookup can be improved:
There may be additional things, but these were the obvious ones. |
Do you mean runtime/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/IndexOfAnyAsciiSearcher.cs Lines 912 to 920 in 4ebecb0
? Which operations would you combine here? |
@JulieLeeMSFT - FYI. |
Unless there's something I'm missing, bitsets can be created just via: |
For these cases, changing from Even when the indices are out of the bounds of the vector, if the positions vector is hard-coded then the overhead of bounds-check is avoided with the shuffle.
Instead of getting a bounds check, after the importation phase, we see an updated index
Assembly for `Vector128.ShuffleUnsafe(sourceVec, Vector128.Create((byte)25, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0));`.
|
Thanks for the analysis. Makes sense the checks would be optimised away. |
This is a "do anytime" issue. |
This was completed in #87126. If there are more instances in BCL that can benefit from VectorTableLookup, we can have a separate issue for them. |
#80297 added support for Arm64's
VectorTableLookup
andVectorTableLookupExtension
APIs. We should start using them in libraries methods.The text was updated successfully, but these errors were encountered: