-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[EXPERIMENT] Use wider types in Layout multiplication #100866
Conversation
…sics This lets us phrase it as just one check, rather than two, and might make it easier on LLVM to optimize. It still passes the codegen test without needing the manual optimization anymore, so let's see.
This comment was marked as resolved.
This comment was marked as resolved.
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit d8ed3d2 with merge 1bd20b5b3b52926ba90895b739c9b4b5472f4adf... |
☀️ Try build successful - checks-actions |
Queued 1bd20b5b3b52926ba90895b739c9b4b5472f4adf with parent d0ea1d7, future comparison URL. |
Finished benchmarking commit (1bd20b5b3b52926ba90895b739c9b4b5472f4adf): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Some surprising wins in doc builds, somehow, but clearly not a good change overall. |
This lets us phrase it as just one check, rather than two, and might make it easier on LLVM to optimize. It still passes the codegen test from #99174 without needing the manual optimization anymore, so let's see whether perf likes it.
We've picked up llvm/llvm-project#56563, so LLVM is now smarter about optimizing
mul nuw
with constants, which is what this is frequently emitting (because the type size often comes from a generic type parameter).The IR/ASM looks pretty good for this approach too. For comparisons, see
cc @CAD97 & #99117