-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Always inline InterpCx::layout_of after perf regression #143334
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
base: master
Are you sure you want to change the base?
Conversation
That's not quite the right command -- and indeed you won't have permission. @bors2 try |
Always inline InterpCx::layout_of after perf regression Followup to #142721 to fix the performance regression. I ran one quick benchmark locally (`ctfe-stress-5`) and it does seem to be faster. I further tried adding `#[inline(always)]` to `compiler/rustc_middle/src/ty/layout.rs` in `layout_of()` under `LayoutOfHelpers` but that didn't change the benchmark results at all. `@rust-timer` build e7e3c9e (I'm not sure I have permission to do the above) r? `@RalfJung` <!-- homu-ignore:start --> <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r? <reviewer name> --> <!-- homu-ignore:end -->
Argh... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (1ab17c0): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.3%, secondary 1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -0.6%, secondary 0.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 462.452s -> 461.112s (-0.29%) |
So, uh, somehow this actually makes things even worse...? |
It seems potentially non-trivial to optimize away the drop glue for this type ENTERED_TRACING_SPAN = ();
fn enter_tracing_span(tracing::Span) -> Self::ENTERED_TRACING_SPAN { () } The macro then simply expands to |
Followup to #142721 to fix the performance regression. I ran one quick benchmark locally (
ctfe-stress-5
) and it does seem to be faster. I further tried adding#[inline(always)]
tocompiler/rustc_middle/src/ty/layout.rs
inlayout_of()
underLayoutOfHelpers
but that didn't change the benchmark results at all.@rust-timer build e7e3c9e
(I'm not sure I have permission to do the above)
r? @RalfJung