-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Use SearchValues<string> in Regex for single string searches #91644
Comments
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions Issue Details#88400 updates regex to use
|
This is done |
#88400 updates regex to use
SearchValues<string>
for multi-substring search. ButSearchValues<string>
is also able to optimize single-substring search beyond whatIndexOf(span, StringComparison.Ordinal{IgnoreCase})
does, as it can precompute and analyze more. We should update the Regex source generator (and possibly the RegexCompiler, although the equation for it is a bit different, as there's a little more overhead for the compiler to access a cachedSearchValues<string>
) to useSearchValues<string>
for some of the places where it searches for a string, in particular the next-starting-position search.The text was updated successfully, but these errors were encountered: