Closed performanceautofiler[bot] closed 1 year ago
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions See info in area-owners.md if you want to be subscribed.
Author: | performanceautofiler[bot] |
---|---|
Assignees: | EgorBo |
Labels: | `area-System.Text.RegularExpressions`, `refs/heads/main`, `RunKind=micro`, `Windows 10.0.19042`, `Regression`, `CoreClr`, `x64` |
Milestone: | - |
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Author: | performanceautofiler[bot] |
---|---|
Assignees: | EgorBo |
Labels: | `tenet-performance`, `tenet-performance-benchmarks`, `area-CodeGen-coreclr`, `refs/heads/main`, `RunKind=micro`, `Windows 10.0.19042`, `Regression`, `CoreClr`, `x64` |
Milestone: | 7.0.0 |
Moving to CodeGen area.
I took a look at the codegen diff (the issue reproduces only in Compiled mode) and it looks like this: https://www.diffchecker.com/HaCxdrD8 (my PR https://github.com/dotnet/runtime/pull/67141 is on the right) - it removes the bound check as was expected but for some reason for this particular pattern it makes code slow and I don't understand why exactly - probably misaligned loop or something like that
Not an issue any more:
Not an issue any more
That said, the graph shows a significant improvement from https://github.com/dotnet/runtime/commit/aea2eb7fea7c7c460b54afc86dfe838123e80410, but then we regress back more than half of that gain, due to what looks like https://github.com/dotnet/runtime/pull/78863 and https://github.com/dotnet/runtime/pull/80830. Am I reading that right? @MihaZupan, is that expected? Maybe this was already discussed elsewhere?
Maybe this was already discussed elsewhere
I think that's effectively #81105.
Avx2 support made the searching throughput for longer strings a lot faster (as expected) but added a noticeable penalty when a match is found. #80830 got a chunk of that difference back, but there's still a gap, so regex patterns where we match a lot are impacted. It's on my todo to see if I can do something about that.
https://github.com/dotnet/runtime/pull/80830 got a chunk of that difference back
That's interesting, since that actually seems to go in the wrong direction here?
That part is not expected, that wasn't what I saw locally -- that PR should have been just improvements across the board. I'll try to take a look soon™️
@stephentoub right, but this regression was filed for June 2022 spike so I closed as irrelevant, for the new regressions there is https://github.com/dotnet/runtime/issues/81105
Ok
Run Information
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock
Test Report
Repro
category:performance theme:benchmarks skill-level:beginner cost:small impact:small