Closed milen-denev closed 1 year ago
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.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak See info in area-owners.md if you want to be subscribed.
Author: | milen-denev |
---|---|
Assignees: | - |
Labels: | `tenet-performance`, `area-CodeGen-coreclr`, `untriaged` |
Milestone: | - |
Probably measuring OSR codegen (note this is with PGO enabled, so perhaps instrumented OSR code?).
Could you rerun the benchmark with [DisassemblyDiagnoser(maxDepth = 6)]
and post the generated files here?
Assigning back to @milen-denev for follow up test request.
Could you rerun the benchmark with
[DisassemblyDiagnoser(maxDepth = 6)]
and post the generated files here?
So, I am sorry for my late reply. I tested again with [DisassemblyDiagnoser(maxDepth: 6)]
and actually only the second time I runned the benchmark and got a result where .net7.0
was slower:
Results (Same configuration, nothing changed):
Method | Job | Runtime | Mean | Error | StdDev | Ratio | Code Size | Allocated | Alloc Ratio |
---|---|---|---|---|---|---|---|---|---|
Benchmark1 | .NET 6.0 | .NET 6.0 | 125.2 us | 0.73 us | 0.69 us | 1.00 | 9,680 B | 9.21 KB | 1.00 |
Benchmark1 | .NET 7.0 | .NET 7.0 | 130.5 us | 1.12 us | 1.05 us | 1.04 | 10,393 B | 8.97 KB | 0.97 |
Files: https://cdn.denevcloud.net/milen-denev/bin.zip
I also tried:
<TieredPGO>false</TieredPGO>
<TieredCompilationQuickJitForLoops>false</TieredCompilationQuickJitForLoops>
Method | Job | Runtime | Mean | Error | StdDev | Ratio | Code Size | Allocated | Alloc Ratio |
---|---|---|---|---|---|---|---|---|---|
Benchmark1 | .NET 6.0 | .NET 6.0 | 125.1 us | 0.73 us | 0.68 us | 1.00 | 9,680 B | 9.22 KB | 1.00 |
Benchmark1 | .NET 7.0 | .NET 7.0 | 127.4 us | 0.28 us | 0.27 us | 1.02 | 10,393 B | 8.99 KB | 0.97 |
Files: https://cdn.denevcloud.net/milen-denev/bin2.zip
Tried this on my box with .NET 6, .NET 7, .NET 8 preview2, and a current .NET 8 main build. There seems to be as fair bit of run to run variation here but in the handful of runs I did, .NET 8 main always was fastest.
Possibly a result of https://github.com/dotnet/runtime/pull/83910, though I have not done proper diligence to prove that's the case.
I'm going to close this. @milen-denev if you get a chance to try a .NET 8 preview and still see a regression then please re-open. Please try preview 4 later so you pick up the change above.
BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.22621.1413/22H2/2022Update/SunValley2) Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores .NET SDK=8.0.100-preview.2.23157.25 [Host] : .NET 8.0.0 (8.0.23.12803), X64 RyuJIT AVX2 Job-XFQKPO : .NET 8.0.0 (42.42.42.42424), X64 RyuJIT AVX2 Job-OPADBB : .NET 6.0.15 (6.0.1523.11507), X64 RyuJIT AVX2 Job-RVDABM : .NET 7.0.4 (7.0.423.11508), X64 RyuJIT AVX2 Job-YLZPTG : .NET 8.0.0 (8.0.23.12803), X64 RyuJIT AVX2
Method | Runtime | Mean | Error | StdDev | Ratio | RatioSD |
---|---|---|---|---|---|---|
Benchmark1 | .NET 6.0 | 100.94 us | 1.918 us | 1.884 us | 1.00 | 0.00 |
Benchmark1 | .NET 7.0 | 91.47 us | 0.445 us | 0.417 us | 0.91 | 0.02 |
Benchmark1 | .NET 8.0 p2 | 93.01 us | 0.403 us | 0.377 us | 0.92 | 0.02 |
Benchmark1 | .NET 8.0 main | 82.95 us | 0.646 us | 0.604 us | 0.82 | 0.02 |
Via <TieredPGO>true</TieredPGO>
in the csproj. (Note this has no effect on .NET 6, and only partial effect on .NET 7)
BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.22621.1413/22H2/2022Update/SunValley2) Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores .NET SDK=8.0.100-preview.2.23157.25 [Host] : .NET 8.0.0 (8.0.23.12803), X64 RyuJIT AVX2 Job-XKOTDN : .NET 8.0.0 (42.42.42.42424), X64 RyuJIT AVX2 Job-HITSWH : .NET 6.0.15 (6.0.1523.11507), X64 RyuJIT AVX2 Job-TYYPKW : .NET 7.0.4 (7.0.423.11508), X64 RyuJIT AVX2 Job-ENCIEP : .NET 8.0.0 (8.0.23.12803), X64 RyuJIT AVX2
Method | Runtime | Mean | Error | StdDev | Ratio | RatioSD |
---|---|---|---|---|---|---|
Benchmark1 | .NET 6.0 | 91.21 us | 1.824 us | 4.740 us | 1.00 | 0.00 |
Benchmark1 | .NET 7.0 | 96.41 us | 0.280 us | 0.248 us | 1.16 | 0.08 |
Benchmark1 | .NET 8.0 p2 | 92.35 us | 1.478 us | 1.383 us | 1.11 | 0.07 |
Benchmark1 | .NET 8.0 main | 82.13 us | 0.292 us | 0.259 us | 0.99 | 0.07 |
The place from where I copied the code:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/mandelbrot-csharpcore-1.html
Actual Code:
Configuration
BenchmarkDotNet=v0.13.4, OS=Windows 11 (10.0.22621.1105) Intel Core i5-10400 CPU 2.90GHz, 1 CPU, 12 logical and 6 physical cores .NET SDK=7.0.102 [Host] : .NET 7.0.2 (7.0.222.60605), X64 RyuJIT AVX2 .NET 6.0 : .NET 6.0.13 (6.0.1322.58009), X64 RyuJIT AVX2 .NET 7.0 : .NET 7.0.2 (7.0.222.60605), X64 RyuJIT AVX2
Regression?
The Regression is tested from .NET 6 -> .NET 7
Data