Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Stypox
Copy link
Contributor

@Stypox Stypox commented Jul 2, 2025

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 2, 2025

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@RalfJung
Copy link
Member

RalfJung commented Jul 2, 2025

That's not quite the right command -- and indeed you won't have permission.

@bors2 try
@rust-timer-queue

@rust-bors
Copy link

rust-bors bot commented Jul 2, 2025

⌛ Trying commit e7e3c9e with merge 1ab17c0

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jul 2, 2025
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 -->
@RalfJung
Copy link
Member

RalfJung commented Jul 2, 2025

Argh...
@rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 2, 2025
@rust-bors
Copy link

rust-bors bot commented Jul 2, 2025

☀️ Try build successful (CI)
Build commit: 1ab17c0 (1ab17c02e0da006756c695942d5aaceaf2bb9a39, parent: b94bd12401d26ccf1c3b04ceb4e950b0ff7c8d29)

@rust-timer
Copy link
Collaborator

Queued 1ab17c0 with parent b94bd12, future comparison URL.
There are currently 12 preceding artifacts in the queue.
It will probably take at least ~13.0 hours until the benchmark run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-perf Status: Waiting on a perf run to be completed. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants