You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be simple enough to revert this particular method, but it would also be ideal if this could just be correctly handled and optimized. CC. @dotnet/jit-contrib
Activity
tannergooding commentedon Apr 8, 2021
@DrewScoggins, do we have disassembly easily accessible?
DrewScoggins commentedon Apr 8, 2021
Thanks to @adamsitnik for noticing this. Look related to this PR #41898
DrewScoggins commentedon Apr 8, 2021
No, because this is so old all the artifacts, if we had them, would have been purged. And this was before we added disassembly to the report.
adamsitnik commentedon Apr 9, 2021
in this case we are lucky and the regression is reproducible on Windows. The disassembly:
git clone https://github.com/dotnet/performance.git py .\performance\scripts\benchmarks_ci.py -f net5.0 net6.0 --filter System.Numerics.Tests.Perf_Vector2.DistanceBenchmark --bdn-arguments "--disasm true".NET 5.0.5 (5.0.521.16609), X64 RyuJIT
.NET 6.0.0 (6.0.21.20503), X64 RyuJIT
DrewScoggins commentedon Apr 9, 2021
Run Information
Regressions in System.Numerics.Tests.Perf_Matrix3x2
Related Issue on x64 Windows
[Perf 16%] System.Numerics.Tests.Perf_Matrix3x2.EqualsBenchmark
Related Issue on x86 Windows
[Perf 37%] System.Numerics.Tests.Perf_Matrix3x2 (2)
Historical Data in Reporting System
Repro
Details
Histogram
System.Numerics.Tests.Perf_Matrix3x2.IsIdentityBenchmark
System.Numerics.Tests.Perf_Matrix3x2.CreateScaleFromScalarXYWithCenterBenchmark
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
DrewScoggins commentedon Apr 9, 2021
These tests also regressed over the same commit range.
DrewScoggins commentedon Apr 9, 2021
.NET 5.0.5 (5.0.521.16609), X64 RyuJIT
.NET 6.0.0 (6.0.21.20503), X64 RyuJIT
6 remaining items
adamsitnik commentedon Jul 9, 2021
@tannergooding the
System.Numerics.Tests.Perf_Matrix3x2.IsIdentityBenchmarkregression reported by @DrewScoggins in #50939 (comment) seems to be not resolved:https://pvscmdupload.blob.core.windows.net/reports/allTestHistory%2frefs%2fheads%2fmaster_x64_ubuntu%2018.04%2fSystem.Numerics.Tests.Perf_Matrix3x2.IsIdentityBenchmark.html
could you please take a look?
adamsitnik commentedon Sep 14, 2021
Compared to .NET 5, we still have this regression:
Details
System.Numerics.Tests.Perf_Matrix3x2.IsIdentityBenchmark
@tannergooding could you PTAL?
adamsitnik commentedon Sep 14, 2021
It's worse for x86:
Details
System.Numerics.Tests.Perf_Vector3.DistanceBenchmark
System.Numerics.Tests.Perf_Vector2.DistanceBenchmark
Repro:
git clone https://github.com/dotnet/performance.git py .\performance\scripts\benchmarks_ci.py -f net5.0 net6.0 --architecture x86 --filter System.Numerics.Tests.Perf_Vector3.DistanceBenchmark --bdn-arguments "--disasm true".NET 5.0.9 (5.0.921.35908), X86 RyuJIT
.NET 6.0.0 (6.0.21.41701), X86 RyuJIT
tannergooding commentedon Sep 14, 2021
This is due to the same original change which cleaned up a bunch of the logic in the
System.Numerics.*types to help improve maintainability.The JIT is preserving two struct copies that occur from the inlining which is causing the perf regression:
and
It would be simple enough to revert this particular method, but it would also be ideal if this could just be correctly handled and optimized. CC. @dotnet/jit-contrib
tannergooding commentedon Jul 9, 2025
The codegen for these methods has been significantly improved over the past few releases and we're back to the original numbers.