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

Perf regressions in sorting #70373

Closed
performanceautofiler bot opened this issue Jun 7, 2022 · 7 comments · Fixed by #70631
Closed

Perf regressions in sorting #70373

performanceautofiler bot opened this issue Jun 7, 2022 · 7 comments · Fixed by #70631
Assignees
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI runtime-coreclr specific to the CoreCLR runtime
Milestone

Comments

@performanceautofiler
Copy link

Run Information

Architecture x64
OS Windows 10.0.19042
Baseline 6a56aa3512c912df602bf074dc925b77f3895b24
Compare be4d292eaf27f3890c877b08f6bf9e2f6279e343
Diff Diff

Regressions in System.Collections.Sort<IntStruct>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
List - Duration of single invocation 5.26 μs 5.76 μs 1.09 0.58 False
Array - Duration of single invocation 4.83 μs 6.09 μs 1.26 0.31 False

graph
graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Collections.Sort&lt;IntStruct&gt;*'

Payloads

Baseline
Compare

Histogram

System.Collections.Sort<IntStruct>.List(Size: 512)


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 5.759162666666667 > 5.6030765.
IsChangePoint: Marked as a change because one of 6/6/2022 7:24:37 AM, 6/7/2022 9:00:42 AM falls between 5/29/2022 5:15:01 PM and 6/7/2022 9:00:42 AM.
IsRegressionStdDev: Marked as regression because -11.565054067065994 (T) = (0 -5939.775063492064) / Math.Sqrt((108931.4423173835 / (66)) + (38042.3217986989 / (6))) is less than -1.9944371117706434 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (66) + (6) - 2, .025) and -0.21072733148025147 = (4905.956039028222 - 5939.775063492064) / 4905.956039028222 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 not as a regression because Edge Detector said so.

```#### System.Collections.Sort&lt;IntStruct&gt;.Array(Size: 512)

```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 6.092561333333334 > 4.987326800000001.
IsChangePoint: Marked as a change because one of 4/19/2022 10:22:09 AM, 5/11/2022 9:09:01 PM, 5/20/2022 10:18:01 PM, 6/6/2022 7:24:37 AM, 6/7/2022 9:00:42 AM falls between 5/29/2022 5:15:01 PM and 6/7/2022 9:00:42 AM.
IsRegressionStdDev: Marked as regression because -14.086982124668868 (T) = (0 -5971.539444444444) / Math.Sqrt((50876.49104594004 / (66)) + (34282.70290531872 / (6))) is less than -1.9944371117706434 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (66) + (6) - 2, .025) and -0.23451521998887023 = (4837.153360084358 - 5971.539444444444) / 4837.153360084358 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 not as a regression because Edge Detector said so.

Docs

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

@performanceautofiler performanceautofiler bot added CoreClr untriaged New issue has not been triaged by the area owner labels Jun 7, 2022
@AndyAyersMS
Copy link
Member

Possibly from #69947

@AndyAyersMS AndyAyersMS removed the untriaged New issue has not been triaged by the area owner label Jun 7, 2022
@EgorBo
Copy link
Member

EgorBo commented Jun 7, 2022

@AndyAyersMS most likely it's #63095, it removed ? true : false from ArraySortHelper

@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.

@AndyAyersMS AndyAyersMS transferred this issue from dotnet/perf-autofiling-issues Jun 7, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 7, 2022
@AndyAyersMS AndyAyersMS changed the title [Perf] Changes at 6/6/2022 10:51:35 AM Perf regressions in sorting Jun 7, 2022
@AndyAyersMS AndyAyersMS removed their assignment Jun 7, 2022
@AndyAyersMS
Copy link
Member

@EgorBo do you want to own this one?

@EgorBo EgorBo self-assigned this Jun 7, 2022
@EgorBo EgorBo added this to the 7.0.0 milestone Jun 7, 2022
@EgorBo EgorBo removed the untriaged New issue has not been triaged by the area owner label Jun 7, 2022
@jeffschwMSFT jeffschwMSFT added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 8, 2022
@ghost
Copy link

ghost commented Jun 8, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Architecture x64
OS Windows 10.0.19042
Baseline 6a56aa3512c912df602bf074dc925b77f3895b24
Compare be4d292eaf27f3890c877b08f6bf9e2f6279e343
Diff Diff

Regressions in System.Collections.Sort<IntStruct>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
List - Duration of single invocation 5.26 μs 5.76 μs 1.09 0.58 False
Array - Duration of single invocation 4.83 μs 6.09 μs 1.26 0.31 False

graph
graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Collections.Sort&lt;IntStruct&gt;*'

Payloads

Baseline
Compare

Histogram

System.Collections.Sort<IntStruct>.List(Size: 512)


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 5.759162666666667 > 5.6030765.
IsChangePoint: Marked as a change because one of 6/6/2022 7:24:37 AM, 6/7/2022 9:00:42 AM falls between 5/29/2022 5:15:01 PM and 6/7/2022 9:00:42 AM.
IsRegressionStdDev: Marked as regression because -11.565054067065994 (T) = (0 -5939.775063492064) / Math.Sqrt((108931.4423173835 / (66)) + (38042.3217986989 / (6))) is less than -1.9944371117706434 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (66) + (6) - 2, .025) and -0.21072733148025147 = (4905.956039028222 - 5939.775063492064) / 4905.956039028222 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 not as a regression because Edge Detector said so.

```#### System.Collections.Sort&lt;IntStruct&gt;.Array(Size: 512)

```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 6.092561333333334 > 4.987326800000001.
IsChangePoint: Marked as a change because one of 4/19/2022 10:22:09 AM, 5/11/2022 9:09:01 PM, 5/20/2022 10:18:01 PM, 6/6/2022 7:24:37 AM, 6/7/2022 9:00:42 AM falls between 5/29/2022 5:15:01 PM and 6/7/2022 9:00:42 AM.
IsRegressionStdDev: Marked as regression because -14.086982124668868 (T) = (0 -5971.539444444444) / Math.Sqrt((50876.49104594004 / (66)) + (34282.70290531872 / (6))) is less than -1.9944371117706434 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (66) + (6) - 2, .025) and -0.23451521998887023 = (4837.153360084358 - 5971.539444444444) / 4837.153360084358 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 not as a regression because Edge Detector said so.

Docs

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

Author: performanceautofiler[bot]
Assignees: EgorBo
Labels:

area-CodeGen-coreclr, refs/heads/main, RunKind=micro, Windows 10.0.19042, Regression, CoreClr, x64

Milestone: 7.0.0

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 11, 2022
@EgorBo
Copy link
Member

EgorBo commented Jun 11, 2022

I checked locally, it's indeed #63095

Going to try to fix it in JIT (#70616)

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 12, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 12, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 13, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 13, 2022
@jeffhandley jeffhandley added runtime-coreclr specific to the CoreCLR runtime arch-x64 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 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI runtime-coreclr specific to the CoreCLR runtime
Projects
None yet
4 participants