Skip to content
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

Replace Utf16Utility.GetPointerToFirstInvalidChar fallback with Vector128 #90391

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

stephentoub
Copy link
Member

The else block will only be used on platforms where Vector<T> is 128-bit, so just use Vector128 explicitly.

…r128

The else block will only be used on platforms where `Vector<T>` is 128-bit, so just use Vector128 explicitly.
@ghost
Copy link

ghost commented Aug 11, 2023

Tagging subscribers to this area: @dotnet/area-system-text-encoding
See info in area-owners.md if you want to be subscribed.

Issue Details

The else block will only be used on platforms where Vector<T> is 128-bit, so just use Vector128 explicitly.

Author: stephentoub
Assignees: stephentoub
Labels:

area-System.Text.Encoding

Milestone: -

@xtqqczze
Copy link
Contributor

Is Vector128 now hardware accelerated on wasm?

@stephentoub
Copy link
Member Author

Is Vector128 now hardware accelerated on wasm?

Yes

@xtqqczze
Copy link
Contributor

@stephentoub Could you also take a look at Ascii.Utility.cs?

if (Vector.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector<ushort>.Count)

@stephentoub
Copy link
Member Author

@stephentoub Could you also take a look at Ascii.Utility.cs?

if (Vector.IsHardwareAccelerated && bufferLength >= 2 * (uint)Vector<ushort>.Count)

I already did.
#90390

@stephentoub
Copy link
Member Author

@stephentoub stephentoub merged commit 2d6421b into dotnet:main Aug 11, 2023
166 of 168 checks passed
@stephentoub stephentoub deleted the utf16vector branch August 11, 2023 16:56
@ghost ghost locked as resolved and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants