Skip to content
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 experiment] Don't emit noalias for box when compiling rustc itself #99527

Closed
wants to merge 1 commit into from

Conversation

Noratrieb
Copy link
Member

This compiles rustc without noalias on box to evaluate the performance impact of such a change on a large scale project like rustc.

Only add it for stage1 compiling stage2, since beta doesn't have the flag yet and stage2 is running the benchmarks.

Most importantly, this does NOT change the emitting of noalias when compiling crates other than rustc, to avoid perf impacts from LLVM having to process less attributes like in #98017.

r? @RalfJung

This compiles rustc without noalias on box to evaluate the performance
impact of such a change on a large scale project like rustc. Most
importantly, this does NOT change the emitting of noalias when compiling
crates other than rustc, to avoid perf impacts from LLVM having to
process less attributes like in rust-lang#98017.
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 20, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 20, 2022
@RalfJung
Copy link
Member

I guess the "r?" is a request for a perf run?
@bors try @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 20, 2022
@bors
Copy link
Contributor

bors commented Jul 20, 2022

⌛ Trying commit fd92015 with merge 0f733da0e9625176a5a6f82c73e1f78d08c44b88...

@Noratrieb
Copy link
Member Author

Thanks! Let's see where this goes and whether there are regressions (or if I messed up the bootstrap :D)

@bors
Copy link
Contributor

bors commented Jul 20, 2022

☀️ Try build successful - checks-actions
Build commit: 0f733da0e9625176a5a6f82c73e1f78d08c44b88 (0f733da0e9625176a5a6f82c73e1f78d08c44b88)

@rust-timer
Copy link
Collaborator

Queued 0f733da0e9625176a5a6f82c73e1f78d08c44b88 with parent a7468c6, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0f733da0e9625176a5a6f82c73e1f78d08c44b88): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results
  • Primary benchmarks: 🎉 relevant improvements found
  • Secondary benchmarks: 🎉 relevant improvements found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-4.0% -5.4% 2
Improvements 🎉
(secondary)
-2.9% -3.9% 3
All 😿🎉 (primary) -4.0% -5.4% 2

Cycles

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
1.9% 1.9% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking 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.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 20, 2022
@Noratrieb
Copy link
Member Author

That's pretty cool. Now we need to know whether there are benefits for other crates, I'd encourage anyone willing to help to run some ecosystem crates benchmarks with the -Zbox-noalias=no RUSTFLAGS and see whether anything changes. If it doesn't, it seems like the way forward is to least disable noalias to mitigate any potential LLVM UB by currently invalid box usage, and consider this for the discussion around Boxes place in SB.

@Noratrieb
Copy link
Member Author

I will now close this, as this was only a perf experiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants