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

Vectorize {RO}Span.IndexOf for T = char, similar to T = byte. - #28464

Merged
ahsonkhan merged 1 commit into
dotnet:masterfrom
ahsonkhan:OptimizeIndexOf
Mar 26, 2018
Merged

Vectorize {RO}Span.IndexOf for T = char, similar to T = byte.#28464
ahsonkhan merged 1 commit into
dotnet:masterfrom
ahsonkhan:OptimizeIndexOf

Conversation

@ahsonkhan

@ahsonkhan ahsonkhan commented Mar 26, 2018

Copy link
Copy Markdown

@@ -3,11 +3,14 @@
// See the LICENSE file in the project root for more information.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be in its own .char.cs file? We are likely going to have quite a few char-specific SpanHelpers.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think it should, as soon as we add char-specific helpers for the other APIs (for example the IndexOf variants). We can move them when we get a 2nd helper method.

@jkotas

jkotas commented Mar 26, 2018

Copy link
Copy Markdown
Member

We should switch String.wcslen and String.IndexOf to use this. It would be interesting to see how the existing implementations compare with this one.

@ahsonkhan
ahsonkhan merged commit 6ca628d into dotnet:master Mar 26, 2018
@ahsonkhan
ahsonkhan deleted the OptimizeIndexOf branch March 26, 2018 05:17
@karelz karelz added this to the 2.1.0 milestone Mar 27, 2018
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.

3 participants