-
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
Improve IndexOfAnyValues throughput for needles with 0 #84184
Conversation
Tagging subscribers to this area: @dotnet/area-system-memory Issue DetailsIncreases Instead of doing "is ascii" detection at the end as a secondary step to rule out false positives, we can effectively merge it into the "pack sources" step in a cheaper way.
Codegen difference: https://www.diffchecker.com/DVRMVOkA This should help with Regex after #83992, and with ASP.NET's header validation.
|
Contributes to #84139 |
d32a923
to
682e307
Compare
Bump Can this one be merged? |
@MihaZupan mind doing a quick benchmark on fortunes to check for this one #86113 crank command before the change:
|
I can check, but I'd be quite surprised if this regressed anything (especially fortunes) |
Tried the following commits:
|
Increases
IndexOfAny
throughput by 25-40% for values that contain a 0.Instead of doing "is ascii" detection at the end as a secondary step to rule out false positives, we can effectively merge it into the "pack sources" step in a cheaper way.
Codegen difference: https://www.diffchecker.com/DVRMVOkA
The main loop with AVX2

This should help with Regex after #83992, and with ASP.NET's header validation.