Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Improve SpanHelpers.Byte#22503

Merged
jkotas merged 1 commit into
dotnet:masterfrom
benaadams:Improve-SpanHelpers.Byte
Feb 13, 2019
Merged

Improve SpanHelpers.Byte#22503
jkotas merged 1 commit into
dotnet:masterfrom
benaadams:Improve-SpanHelpers.Byte

Conversation

@benaadams
Copy link
Copy Markdown
Member

From #22187

Mostly renaming nLength to lengthToExamine but also moving ors to Vector space e.g.

-   int matches = Sse2.MoveMask(Sse2.CompareEqual(values0, search));
-   matches |= Sse2.MoveMask(Sse2.CompareEqual(values1, search));
+   int matches = Sse2.MoveMask(
+       Sse2.Or(
+           Sse2.CompareEqual(values0, search),
+           Sse2.CompareEqual(values1, search)));


[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe IntPtr UnalignedByteCountVector(ref byte searchSpace)
private static unsafe IntPtr UnalignedCountVector(ref byte searchSpace)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change because is typed by param so doesn't need Byte in its name; motivated when adding same methods for char in #22505

Copy link
Copy Markdown
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit a85d443 into dotnet:master Feb 13, 2019
@benaadams benaadams deleted the Improve-SpanHelpers.Byte branch February 13, 2019 15:48
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Feb 13, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corert that referenced this pull request Feb 13, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
stephentoub pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Feb 13, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
stephentoub pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Feb 13, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
stephentoub pushed a commit to dotnet/corefx that referenced this pull request Feb 13, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas pushed a commit to dotnet/corert that referenced this pull request Feb 14, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants