-
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
[Perf] Linux/x64: 6 System.Text.RegularExpressions.Tests Regressions #102203
Comments
Other regressions: |
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions |
Potentially related to: #101899, FYI @stephentoub |
@MihaZupan, is there anything you can think of to reduce the startup overhead of IndexOfAny{Except} with SearchValues further? The difference here essentially stems from replacing this: int iteration = 0;
while (iteration < 12 && (uint)iteration < (uint)slice.Length && char.IsAsciiLetter(slice[iteration]))
{
iteration++;
} with this: int iteration = slice.Slice(0, Math.Min(slice.Length, 12)).IndexOfAnyExcept(Utilities.s_asciiLetters);
if (iteration < 0)
{
iteration = Math.Min(slice.Length, 12);
} The new code is cleaner and better for longer searches, but if the match is found early, it obviously represents a (small) regression. We might just need to accept it. I did notice that this SearchValues ( |
This is about how it could look like to have an (note that these numbers are from an AVX2 system, might change a bit with Avx512) Benchmarks
This implementation (specific to X86's Packed variants) would take very little code to add, but it's also quite close to the ASCII impl in perf. |
@MihaZupan is this still planned for v9? |
Run Information
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 8, Options: Compiled)
ETL Files
Histogram
JIT Disasms
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 7, Options: Compiled)
ETL Files
Histogram
JIT Disasms
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 6, Options: Compiled)
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig.Count(Pattern: ".{0,2}(Tom|Sawyer|Huckleberry|Finn)", Options: Compiled)
ETL Files
Histogram
JIT Disasms
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig.Count(Pattern: ".{2,4}(Tom|Sawyer|Huckleberry|Finn)", Options: Compiled)
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Common
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
System.Text.RegularExpressions.Tests.Perf_Regex_Common.Email_IsNotMatch(Options: IgnoreCase, Compiled)
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: