Skip to content
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

Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Mariomkas #67915

Closed
performanceautofiler bot opened this issue Apr 12, 2022 · 9 comments
Labels
arch-x64 runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark

Comments

@performanceautofiler
Copy link

Run Information

Architecture x64
OS alpine 3.12
Baseline c288acdb794b1f2edba90868a823b161d88bd2b0
Compare bed8bc7094f24360256ee4c014da3c5cadc2e3d2
Diff Diff

Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Mariomkas

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Ctor - Duration of single invocation 244.43 μs 1.41 ms 5.78 0.08 True
Ctor - Duration of single invocation 272.89 μs 1.80 ms 6.61 0.08 True
Ctor - Duration of single invocation 67.12 μs 235.76 μs 3.51 0.02 True

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Mariomkas*'

Payloads

Baseline
Compare

Histogram

System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Mariomkas.Ctor(Pattern: "[\w.+-]+@[\w.-]+.[\w.-]+", Options: NonBacktracking)


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 1.412064234237829 > 263.65086649920227.
IsChangePoint: Marked as a change because one of 4/7/2022 6:53:49 PM, 4/12/2022 4:54:37 AM falls between 4/3/2022 1:52:36 PM and 4/12/2022 4:54:37 AM.
IsRegressionStdDev: Marked as regression because -442.7266427702717 (T) = (0 -1405129.3695480844) / Math.Sqrt((70881783.0600003 / (36)) + (101775251.0448288 / (21))) is less than -2.0040447832881556 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (36) + (21) - 2, .025) and -4.635513206310686 = (249334.76652571963 - 1405129.3695480844) / 249334.76652571963 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked as regression because Edge Detector said so.

```#### System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Mariomkas.Ctor(Pattern: "[\w]+://[^/\s?#]+[^\s?#]+(?:\?[^\s#]*)?(?:#[^\s]*)?", Options: NonBacktracking)

```log

Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 1.8027213416666665 > 295.18631531519117.
IsChangePoint: Marked as a change because one of 4/7/2022 6:53:49 PM, 4/12/2022 4:54:37 AM falls between 4/3/2022 1:52:36 PM and 4/12/2022 4:54:37 AM.
IsRegressionStdDev: Marked as regression because -233.25666232436387 (T) = (0 -1847060.0217951036) / Math.Sqrt((23866940.538115114 / (36)) + (934263338.7843062 / (21))) is less than -2.0040447832881556 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (36) + (21) - 2, .025) and -5.60391858176957 = (279691.519349436 - 1847060.0217951036) / 279691.519349436 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked as regression because Edge Detector said so.

```#### System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Mariomkas.Ctor(Pattern: "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9])", Options: NonBacktracking)

```log

Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 235.75944745523088 > 70.42950782640385.
IsChangePoint: Marked as a change because one of 4/7/2022 6:53:49 PM, 4/12/2022 4:54:37 AM falls between 4/3/2022 1:52:36 PM and 4/12/2022 4:54:37 AM.
IsRegressionStdDev: Marked as regression because -368.19084796704203 (T) = (0 -236688.0018984326) / Math.Sqrt((574525.3804394128 / (36)) + (4129276.1124053122 / (21))) is less than -2.0040447832881556 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (36) + (21) - 2, .025) and -2.5366697545432917 = (66923.97603547163 - 236688.0018984326) / 66923.97603547163 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked as regression because Edge Detector said so.

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

@performanceautofiler performanceautofiler bot added alpine 3.12 untriaged New issue has not been triaged by the area owner labels Apr 12, 2022
@EgorBo EgorBo changed the title [Perf] Changes at 4/8/2022 12:32:23 AM Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Mariomkas Apr 12, 2022
@EgorBo EgorBo transferred this issue from dotnet/perf-autofiling-issues Apr 12, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@EgorBo EgorBo added tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark labels Apr 12, 2022
@EgorBo
Copy link
Member

EgorBo commented Apr 12, 2022

#67673 cc @stephentoub

@EgorBo
Copy link
Member

EgorBo commented Apr 12, 2022

ubuntu-x64 dotnet/perf-autofiling-issues#4523

@stephentoub
Copy link
Member

Thanks. This one is expected. We had an unbounded memory leak due to a static cache, which I deleted. This test is measuring construction time, so the change essentially reverted the ctor cost to what it should have been all along, rather than reusing the objects from a previous construction of the exact same regex.

@stephentoub
Copy link
Member

(Interestingly, though, it results in a significant improvement in construction time if, over time, you end up creating lots of different regexes, as then you see the full negative impact of the unbounded cache. We have a test that constructs several thousand different regexes, and that improved by ~3x.)

@DrewScoggins
Copy link
Member

DrewScoggins commented Apr 14, 2022

Windows-Arm64: dotnet/perf-autofiling-issues#4616

@DrewScoggins
Copy link
Member

Ubuntu-Arm64: dotnet/perf-autofiling-issues#4627

@DrewScoggins
Copy link
Member

Win-x64: dotnet/perf-autofiling-issues#4573

@dakersnar
Copy link
Contributor

Windows x64: dotnet/perf-autofiling-issues#4606

@jeffhandley jeffhandley removed the untriaged New issue has not been triaged by the area owner label May 6, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 5, 2022
@jeffhandley jeffhandley added runtime-coreclr specific to the CoreCLR runtime and removed CoreClr labels Dec 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

5 participants