Repository navigation
Closed as not planned
Labels
arch-arm64area-System.Text.RegularExpressionsos-windowsruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime
Milestone
Description
Run Information
| Name | Value |
|---|---|
| Architecture | arm64 |
| OS | Windows 10.0.19041 |
| Queue | SurfaceWindows |
| Baseline | 9e57b6a280308b6e5dc85d1f0c9200cb698fb98b |
| Compare | 653739cc0e4f6c7a44e4cda6c9ac8bb2a265505a |
| Diff | Diff |
| Configs | CompilationMode:tiered, RunKind:micro |
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock
| Benchmark | Baseline | Test | Test/Base | Test Quality | Edge Detector | Baseline IR | Compare IR | IR Ratio |
|---|---|---|---|---|---|---|---|---|
| 161.49 μs | 174.35 μs | 1.08 | 0.33 | False | ||||
| 7.38 ms | 10.62 ms | 1.44 | 0.27 | False | ||||
| 145.01 μs | 173.20 μs | 1.19 | 0.39 | False | ||||
| 110.25 μs | 116.58 μs | 1.06 | 0.00 | False |
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock*'Details
Payloads
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern: "(?i)Sherlock", Options: Compiled)
ETL Files
Histogram
JIT Disasms
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern: "\b\w+n\b", Options: NonBacktracking)
ETL Files
Histogram
JIT Disasms
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern: "(?i)Sherlock Holmes", Options: Compiled)
ETL Files
Histogram
JIT Disasms
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern: "aqj", Options: Compiled)
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
| Name | Value |
|---|---|
| Architecture | arm64 |
| OS | Windows 10.0.19041 |
| Queue | SurfaceWindows |
| Baseline | 623cf77a58f7a233b94dcc1c3ef8eb8d67e8d948 |
| Compare | 653739cc0e4f6c7a44e4cda6c9ac8bb2a265505a |
| Diff | Diff |
| Configs | CompilationMode:tiered, RunKind:micro |
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_SliceSlice
| Benchmark | Baseline | Test | Test/Base | Test Quality | Edge Detector | Baseline IR | Compare IR | IR Ratio |
|---|---|---|---|---|---|---|---|---|
| 1.63 secs | 1.75 secs | 1.07 | 0.01 | False |
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.RegularExpressions.Tests.Perf_Regex_Industry_SliceSlice*'Details
Payloads
System.Text.RegularExpressions.Tests.Perf_Regex_Industry_SliceSlice.Count(Options: IgnoreCase, Compiled)
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Metadata
Metadata
Assignees
Labels
arch-arm64area-System.Text.RegularExpressionsos-windowsruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime





Activity
[-][Perf] Windows/arm64: 5 Regressions on 1/2/2024 10:16:29 PM[/-][+]Regressions in System.Text.RegularExpressions.Tests.Perf_Regex[/+]EgorBo commentedon Jan 4, 2024
Some graphs are a bit out-of-date e.g. the last one is:

Looks like it's regressed by #96402 cc @stephentoub
EgorBo commentedon Jan 4, 2024
Also:
stephentoub commentedon Jan 4, 2024
cc: @MihaZupan
stephentoub commentedon Jun 27, 2024
@MihaZupan, could you take a look at this one? The regressions that remain all appear to be due to using
SearchValues.Create(["something"], ...)rather thanIndexOf("something", ...)in the generated regex code.MihaZupan commentedon Jun 27, 2024
I'll try to take a look next week.
MihaZupan commentedon Jul 3, 2024
Rough numbers from X64:
SliceSlice
Sherlock
I do see that practically all regressions linked against #96402 (including this one) were arm64-based.
I'll check that as well.
MihaZupan commentedon Jul 4, 2024
Seeing the same kind of thing on ARM.
@stephentoub I think this one is a non-issue. The regressions described in this issue were taken a day before #96429 was merged, so it's possible that improved things.
Though looking at the perf graphs, I still see the regression 😕

stephentoub commentedon Jul 4, 2024
It's even more pronounced in this one:
https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_arm64_Windows%2010.0.19041/System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern%3a%20%22(%3fi)Sherlock%22%2c%20Options%3a%20Compiled).html
MihaZupan commentedon Jul 4, 2024
I'm a bit confused, the above ARM numbers showing improvements are from an Azure
Dplsv5VM (Ampere Altra).But the perf lab results (presumably from the same type of Ampere CPUs?) show a regression.
FWIW this is what I was testing against for
literalMihaZupan@8ef2f17#diff-f57fafe69c92d1c6acae34ecb5078ce2993286d9d9d2f7a639a4ab90178d4b67ericstj commentedon Aug 7, 2024
@MihaZupan I assigned this to you for now. Do you think there is something we can do in SearchValues to gain back this perf? Or is this something we need to accept as a tradeoff in using this new type?
MihaZupan commentedon Aug 23, 2024
I'm sure there are tweaks we could make to
SearchValuesto improve things further here.The problem is that I've so far been unable to reproduce this regression -- I see it as an improvement on both X64 and Arm64.
ericstj commentedon Sep 16, 2024
@MihaZupan / @stephentoub - do you think this warrants further investigation or a fix for 9.0?
stephentoub commentedon Sep 16, 2024
At this point, given an inability to reproduce, I don't see a change being made here for 9.
ericstj commentedon Sep 17, 2024
Ok, I'm going to go ahead and resolve this then.