-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 IndexOfAny(byte,byte,byte) #40894
Improve IndexOfAny(byte,byte,byte) #40894
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
647a01c
to
d5686ed
Compare
d5686ed
to
c633e58
Compare
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. @GrabYourPitchforks can you take a look at it please?
@benaadams can you please share benchmarks for this change? Also, is there an issue we can link to this PR? |
It would be great to see the deltas on this.
Probably not; but that's fine. |
@benaadams I think we are just waiting to see the benchmark results for this change, and we can presumably get this merged. |
@jeffhandley can't currently build anything using .NET6.0 in VS dotnet/sdk#17461 |
@benaadams hopefully with the latest releases, this should be unblocked. Let us know if you're still having trouble though. Thanks! |
@GrabYourPitchforks This PR is assigned to you for follow-up/decision before the RC1 snap. |
@jeffhandley @GrabYourPitchforks I've moved it to 7.0 as it's not crucial for the 6.0 release |
@benaadams I've merged from main and verified that everything merged and builds cleanly. Could you run the affected perf tests and post the results to show the delta? Thanks! |
I ran microbenchmarks on my desktop and saw the following results. dotnet:main @ 221f1f5BenchmarkDotNet=v0.13.1.1611-nightly, OS=Windows 10.0.22478
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET SDK=7.0.100-alpha.1.21518.14
[Host] : .NET 7.0.0 (7.0.21.48001), X64 RyuJIT
Job-XZNBLJ : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT
PowerPlanMode=00000000-0000-0000-0000-000000000000 Arguments=/p:DebugType=portable,-bl:benchmarkdotnet.binlog Toolchain=CoreRun
IterationTime=250.0000 ms MaxIterationCount=20 MinIterationCount=15
WarmupCount=1
benaadams:improved-IndexOfAny(byte-x3 @ eb85e70BenchmarkDotNet=v0.13.1.1611-nightly, OS=Windows 10.0.22478
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET SDK=7.0.100-alpha.1.21518.14
[Host] : .NET 7.0.0 (7.0.21.48001), X64 RyuJIT
Job-BMOQDB : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT
PowerPlanMode=00000000-0000-0000-0000-000000000000 Arguments=/p:DebugType=portable,-bl:benchmarkdotnet.binlog Toolchain=CoreRun
IterationTime=250.0000 ms MaxIterationCount=20 MinIterationCount=15
WarmupCount=1
Comparisonsummary:
better: 1, geomean: 1.229
worse: 2, geomean: 1.293
total diff: 3
Since @stephentoub or @jkotas -- what do you think? Are there any additional benchmark results you'd like to see? |
Linux/x64 improvement - dotnet/perf-autofiling-issues#1983, dotnet/perf-autofiling-issues#2011 |
need to double check if we should also make equivalent changes in arm64 |
Great to see the results surface in the lab results. Thanks again for the PR, @benaadams. |
As per
IndexOfAny(byte,byte)
andIndexOfAny(char, ...)