-
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
GetIndexOfFirstNonAsciiByte_Vector path in Ascii.Utility.cs is never exercised for AdvSimd/SSE4.1 #89924
Comments
Looks like a regression (or leftover) from #88532 cc @anthonycanino |
Tagging subscribers to this area: @dotnet/area-system-text-encoding Issue DetailsDescriptionIt appears that Is this intended? Should SSE4.1 and AdvSimd targets be allowed to take Regression?No. DataPreliminary benchmark shows that on
|
@neon-sunset, @tannergooding pointed out to me offline it was using the _Intrinsified path in .NET 7: runtime/src/libraries/System.Private.CoreLib/src/System/Text/ASCIIUtility.cs Lines 81 to 91 in a6dbb80
Did you measure it to be a regression from .NET 7, and if so, can you share the benchmark and your resulting numbers? Or are you just saying it's not as good in .NET 8 as it could be but it's not a regression? EDIT: Tanner just commented on the PR with similar feedback: |
Yes, it appears to not be a regression because I mistakenly assumed the |
Description
It appears that
GetIndexOfFirstNonAsciiByte
in https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Text/Ascii.Utility.cs#L104 does not exercise theGetIndexOfFirstNonAsciiByte_Vector
path despite it having explicit support forAdvSimd
andSSE4.1
.Is this intended? Should SSE4.1 and AdvSimd targets be allowed to take
_Vector
instead?Regression?
No
Data
Preliminary benchmark shows that on
osx-arm64
apple-m1
the time to traverse 1_000_000 bytes is 28.71us with current_Intrinsified
path and is improved by ~40% to20.12us
if we relax the check and allow callingGetIndexOfFirstNonAsciiByte_Vector
forVector128.IsHardwareAccelerated
.The text was updated successfully, but these errors were encountered: