-
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] Regressions in Integer Formatting #54166
Comments
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: @dotnet/area-system-runtime Issue DetailsRun Information
Regressions in System.Tests.Perf_Int32
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Tests.Perf_Int32*' PayloadsHistogramSystem.Tests.Perf_Int32.ToString(value: 2147483647)
System.Tests.Perf_Int32.TryFormat(value: 2147483647)
DocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Tests.Perf_UInt64
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Tests.Perf_UInt64*' PayloadsHistogramSystem.Tests.Perf_UInt64.TryFormat(value: 12345)
DocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Tests.Perf_Version
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Tests.Perf_Version*' PayloadsHistogramSystem.Tests.Perf_Version.TryFormatL
DocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Tests.Perf_UInt32
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Tests.Perf_UInt32*' PayloadsHistogramSystem.Tests.Perf_UInt32.ToString(value: 4294967295)
System.Tests.Perf_UInt32.TryFormat(value: 4294967295)
DocsProfiling workflow for dotnet/runtime repository
|
@tannergooding looking at the list of changes, fdbef6c popped out, but Dragon doesn't do much actual division does it? |
Dragon is for floating-point. Integer formatting frequently divides by 10: https://source.dot.net/#System.Private.CoreLib/Number.Formatting.cs,c66436177df5dc9b |
cc: @pentp |
I don't have an arm64 machine to do perf tests, so I'm trying to get some assembly diffs, but I can't get
I then tried to get dasm output:
I also tried with -j option and it complains about the file being in use (by itself probably, nothing else has it open):
I then tried to manually copy the clrjit.dll files and run with --nocopy:
I've clearly misunderstood how these utilities work. Can they even be used to get arm64 asm dumps on win-x64 or is there a better/easier way? |
@dotnet/jit-contrib could someone help @pentp here? I've updated the area to codegen as I can't see a relevant change on the libraries side, let me know if that's not right. |
Untriaging for codegen team to do. |
CC @AndyAyersMS PTAL. |
Test history implicate #52893. In particular the change was merged, reverted, and then re-merged, which matches the up-down-up seen here: As for how to get diffs, it should be something like:
|
Thanks @AndyAyersMS. |
#52893 clearly improves the cost of division on x64, so at this point I'd say there is something unexpected going on that is arm64 specific and we should try and figure out what that is. EG Here's the windows x64 results for that same test over the same time interval. @pentp if you can't get diffs using the above let me know and I'll actually go try it myself to make sure I didn't leave out anything important. |
Marking as 6.0 at least until we've better understood what's going on. |
I wonder if its partially due to certain operations, such as integer division, being significantly more expensive on x86/x64 (as you only have On A64, the benefits of avoiding |
@AndyAyersMS can it also be PGO related? dc7598e |
So I managed to finally generate a diff: https://www.diffchecker.com/Rr7cRI2V Edit: ARM software optimization guides seem to indicate that |
I think these are running on Surface Pro X machines, which are A76 (big). @echesakov can you ask the Arm folks to take a look and see if they have any ideas? |
@TamarChristinaArm Do you think you or someone on your team would be able to help us with the issue? |
Sure thing!, taking a look. |
I think this is correct culprid, the loop has a long dependency chain off the value out of the
The |
As a side note, while looking at the diff I noticed some other general improvements that could be made in the future:
can become
and
can become
lastly
can become
and probably want to move the constant out of the loop. |
Run Information
Regressions in System.Tests.Perf_Int32
Historical Data in Reporting System
Repro
Payloads
Baseline
Compare
Histogram
System.Tests.Perf_Int32.ToString(value: 2147483647)
System.Tests.Perf_Int32.TryFormat(value: 2147483647)
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Tests.Perf_UInt64
Historical Data in Reporting System
Repro
Payloads
Baseline
Compare
Histogram
System.Tests.Perf_UInt64.TryFormat(value: 12345)
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Tests.Perf_Version
Historical Data in Reporting System
Repro
Payloads
Baseline
Compare
Histogram
System.Tests.Perf_Version.TryFormatL
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Tests.Perf_UInt32
Historical Data in Reporting System
Repro
Payloads
Baseline
Compare
Histogram
System.Tests.Perf_UInt32.ToString(value: 4294967295)
System.Tests.Perf_UInt32.TryFormat(value: 4294967295)
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: