-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix GetIndexOfFirstNonAsciiByte_Vector not taken on ARM64 #90527
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ec93a80
Fix GetIndexOfFirstNonAsciiByte_Vector not taken on ARM64
neon-sunset a00b989
Remove unreachable code
neon-sunset 6482623
Merge branch 'main' into fix-ascii-arm64
neon-sunset afa24ac
Merge branch 'dotnet:main' into fix-ascii-arm64
neon-sunset File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If we do this, then doesn't this change leave a bunch of dead code in GetIndexOfFirstNonAsciiByte_Intrinsified that should be cleaned up? It has multiple blocks dedicated to AdvSimd which would never be reached. At which point the method should also be renamed to be SSE-specific.
But I'd also explicitly asked about this:
#88532 (comment)
and was told the preferring of the intrinsics path was by design. Maybe it was only measured on x64 and not on Arm?
cc: @tannergooding, @anthonycanino
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.
Let me fix that.
The
_Vector
path is estimated to be ~40% faster onosx-arm64
, It is likely the switch was not measured on ARM64.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.
@neon-sunset can you clarify please? .NET 7 was using the
_Intrinsified
path for Arm64: https://github.com/dotnet/runtime/blob/v7.0.10/src/libraries/System.Private.CoreLib/src/System/Text/ASCIIUtility.cs#L81-L91The PR that introduced the
_Vector
path (#88532) didn't change_Intrinsified
at all (outside using the centralizedVector128.Size
constant) and didn't change which Arm64 was calling.This then wouldn't seem like a regression, but rather simply a case where the new
_Vector
code is faster for Arm64. If that's the case, could you share your own numbers showing the.NET 7
vs.NET 8
difference (without this PR) and the difference for_Vector
vs_Intrinsified
for .NET 8 (this PR vs without this PR)?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.
You are correct, my mistake.
This is the plan, I'm just waiting for the
Release
build to finish to post detailed numbers 😄