-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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] Windows/x64: Decimal Regressions on 2/3/2025 6:32:46 PM +00:00 #112432
Comments
Due to #99212 (These benchmarks use Decimal). From range: b2880ae...cd1657d. FYI @tannergooding Related Regressions: |
Tagging subscribers to this area: @dotnet/area-system-numerics |
CC. @Daniel-Svensson given the official benchmarks are showing regressions we may need to look at reverting. There are also some improvements (linked to from the bottom of #99212), so some further analysis might be desirable. Is that something you have the capacity to look at? |
I can try to have a quick look, but it will take a week or two before I have the time and energy. I had a quick look at the diff and it nothing stood out for the compare (add/sub) case.
With the improvements, do you refer to the switch statement or the list of performance improvements from the PR Summary under "Remarks for better performance" (add with carry, MultiplyNoFlags and ShiftLeft128) ? I do not think I have the capacity to fix any of the instrincts at the moment, but if someone does then I will gladly help to apply them to the decimal code. (I think add/sub with carry made the c++ compare/add/sub code 4-10% faster with a lot less branches if I remember correctly) |
This list at the very bottom of the PR:
Notably, Micro benchmarks tend to perform better with branches due to typically testing the same input over and over. What is best for real world code tends to be workload specific. The actual perf regression here look to be related to - ulong tmpLow = Math.BigMul((uint)low64, power);
- ulong tmp = Math.BigMul((uint)(low64 >> 32), power) + (tmpLow >> 32);
- low64 = (uint)tmpLow + (tmp << 32);
- tmp >>= 32;
+ ulong tmp = Math.BigMul(low64, power, out low64); |
Run Information
Regressions in LinqBenchmarks
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
LinqBenchmarks.Order00ManualX
ETL Files
Histogram
JIT Disasms
LinqBenchmarks.Order00LinqQueryX
ETL Files
Histogram
JIT Disasms
LinqBenchmarks.Order00LinqMethodX
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: