-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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.Numerics.Tests.Perf_Vector3 #86033
Comments
Run Information
Regressions in System.Numerics.Tests.Perf_Vector3ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Numerics.Tests.Perf_Vector3*' PayloadsHistogramSystem.Numerics.Tests.Perf_Vector3.LerpBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.MultiplyOperatorBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.ClampBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.UnitYBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.MaxBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.SquareRootBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.CreateFromScalarXYZBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.TransformByMatrix4x4Benchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.AddOperatorBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.DivideByScalarBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.OneBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.MultiplyByScalarBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.MultiplyFunctionBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.NegateOperatorBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.CrossBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.AbsBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.SubtractOperatorBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.CreateFromVector2WithScalarBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.CreateFromScalar
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.TransformByQuaternionBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.ZeroBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.NormalizeBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.ReflectBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.DivideByScalarOperatorBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.MinBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.NegateBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.TransformNormalByMatrix4x4Benchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.SubtractFunctionBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.DivideByVector3Benchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.MultiplyByScalarOperatorBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.DivideByVector3OperatorBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.UnitZBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.UnitXBenchmark
Description of detection logic
JIT DisasmsSystem.Numerics.Tests.Perf_Vector3.AddFunctionBenchmark
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository |
Run Information
Regressions in System.Numerics.Tests.Perf_Matrix4x4
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Numerics.Tests.Perf_Matrix4x4*' PayloadsHistogramSystem.Numerics.Tests.Perf_Matrix4x4.TranslationBenchmark
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Collections.IterateFor<Int32>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.IterateFor<Int32>*' PayloadsHistogramSystem.Collections.IterateFor<Int32>.ImmutableList(Size: 512)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple*' PayloadsHistogramSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 12, Options: Compiled)
Description of detection logic
JIT DisasmsSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 9, Options: None)
Description of detection logic
JIT DisasmsSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 11, Options: Compiled)
Description of detection logic
JIT DisasmsSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 13, Options: Compiled)
Description of detection logic
JIT DisasmsSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_BoostDocs_Simple.IsMatch(Id: 10, Options: None)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock*' PayloadsHistogramSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern: "(?m)^Sherlock Holmes|Sherlock Holmes$", Options: Compiled)
Description of detection logic
JIT DisasmsSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern: "\p{Ll}", Options: None)
Description of detection logic
JIT DisasmsSystem.Text.RegularExpressions.Tests.Perf_Regex_Industry_RustLang_Sherlock.Count(Pattern: "\p{L}", Options: None)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in Span.IndexerBench
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Span.IndexerBench*' PayloadsHistogramSpan.IndexerBench.Ref(length: 1024)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Collections.IterateFor<String>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.IterateFor<String>*' PayloadsHistogramSystem.Collections.IterateFor<String>.ImmutableArray(Size: 512)
Description of detection logic
JIT DisasmsSystem.Collections.IterateFor<String>.ImmutableSortedSet(Size: 512)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Memory.Span<Int32>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Memory.Span<Int32>*' PayloadsHistogramSystem.Memory.Span<Int32>.StartsWith(Size: 512)
Description of detection logic
JIT DisasmsSystem.Memory.Span<Int32>.SequenceCompareTo(Size: 33)
Description of detection logic
JIT DisasmsSystem.Memory.Span<Int32>.IndexOfAnyFiveValues(Size: 4)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Xml.Linq.Perf_XElement
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Xml.Linq.Perf_XElement*' PayloadsHistogramSystem.Xml.Linq.Perf_XElement.GetElementWithNamespace
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Net.Tests.Perf_WebUtility
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Net.Tests.Perf_WebUtility*' PayloadsHistogramSystem.Net.Tests.Perf_WebUtility.Decode_NoDecodingRequired
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository |
Run Information
Regressions in System.Tests.Perf_Version
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Version*' PayloadsHistogramSystem.Tests.Perf_Version.ToStringL
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Common
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.RegularExpressions.Tests.Perf_Regex_Common*' PayloadsHistogramSystem.Text.RegularExpressions.Tests.Perf_Regex_Common.IP_IsMatch(Options: IgnoreCase, Compiled)
Description of detection logic
JIT DisasmsSystem.Text.RegularExpressions.Tests.Perf_Regex_Common.IP_IsNotMatch(Options: IgnoreCase, Compiled)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Xml.Tests.Perf_XmlConvert
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Xml.Tests.Perf_XmlConvert*' PayloadsHistogramSystem.Xml.Tests.Perf_XmlConvert.TimeSpan_ToString
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Collections.IterateForEach<Int32>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.IterateForEach<Int32>*' PayloadsHistogramSystem.Collections.IterateForEach<Int32>.Queue(Size: 512)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in Benchstone.MDBenchI.MDNDhrystone
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Benchstone.MDBenchI.MDNDhrystone*' PayloadsHistogramBenchstone.MDBenchI.MDNDhrystone.Test
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Tests.Perf_Uri
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*' PayloadsHistogramSystem.Tests.Perf_Uri.GetComponents
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Collections.CtorFromCollection<String>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.CtorFromCollection<String>*' PayloadsHistogramSystem.Collections.CtorFromCollection<String>.Dictionary(Size: 512)
Description of detection logic
JIT DisasmsSystem.Collections.CtorFromCollection<String>.FrozenDictionary(Size: 512)
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository |
Majority of regressions comes from this commit range 82640bd...640df60. There's a PGO update in that range. But might still be worth looking at the regressions as the change is not small. |
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details
|
Can repro (on intel x64)
base is 0535b03
Oddly this looks like a lot more time spent in the BDN wrapper; the perf "payload" here takes about the same amount of time. |
BDN codegen for ;; base -- overhead
call [rax+18H]BenchmarkDotNet.Autogenerated.Runnable_0+OverheadDelegate:Invoke():float:this
vmovss dword ptr [rbp+48H], xmm0
;; base -- WorkloadActionNoUnroll
call [rax+18H]BenchmarkDotNet.Autogenerated.Runnable_0+WorkloadDelegate:Invoke():System.Numerics.Vector3:this
vmovss xmm0, dword ptr [rsp+110H]
vmovss dword ptr [rbp+48H], xmm0
;; diff -- overhead
call [rax+18H]BenchmarkDotNet.Autogenerated.Runnable_0+OverheadDelegate:Invoke():float:this
vmovss dword ptr [rbp+48H], xmm0
;; diff -- workoad
call [rax+18H]BenchmarkDotNet.Autogenerated.Runnable_0+WorkloadDelegate:Invoke():System.Numerics.Vector3:this
vmovaps xmm0, xmmword ptr [rsp+110H]
vextractps dword ptr [rbp+48H], xmm0, 0 At the IR level (post inline):
|
So this is not a PGO issue, but none of the implicated commits make sense either. Any ideas @tannergooding @SingleAccretion ? |
The IR diff is of course from #85568, and the assembly diff is I am guessing because local morph transforms the access into a |
So the cause here is that we don't promote the vectors anymore, probably due to #85561 (they no longer have handles). This is "good" in general, we want and expect most SIMDs to never get promoted. Here though in lowering+codegen, we get a |
That latter case is a simple codegen opt we can make. I had actually thought we were already doing it and optimizing |
Also I still need to figure out why BDN is generating different code for the overhead and action wrappers. That sort of divergence will only lead to headaches since we subtract one from the other (and if more widespread, might explain some of those mysterious "0 ns" results). I guess if they were both inefficient, we might never have noticed this. |
I've put up #86209 which should handle the |
BDN is also measuring different things with "overhead" here which would be nice to fix. Opened dotnet/BenchmarkDotNet#2305 |
Foxed by #86209 (etc) |
The Vector3 / Matrix regressions are "real" [see note below]. The rest are noise.
The text was updated successfully, but these errors were encountered: