-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Try Vector128 before Vector #89797
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
Try Vector128 before Vector #89797
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-text-encoding Issue Detailsnull
|
| { | ||
| return GetIndexOfFirstNonAsciiByte_Intrinsified(pBuffer, bufferLength); | ||
| } | ||
| else if (Vector128.IsHardwareAccelerated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above Sse2 or AdvSimd paths are the code paths that use Vector128 and are much more efficient than the associated Vector128 path.
I believe if it reaches this point, where we cannot use Vector512, Vector256, or Sse2/AdvSimd, then the Vector path itself will likely be as efficient and no need to call back into _Vector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would prefer the Vector128 path for wasm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, understood. Thanks for the context.
tannergooding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This just adds to the reasons why having a single shared implementation using the xplat APIs is goodness.
After #88532 The code prefers Vector512/Vector256/AdvSimd but then falls back to Vector rather than Vector128 which is implemented in the _Vector method
(I didn't actually check the Vector128 path closely)