-
Notifications
You must be signed in to change notification settings - Fork 13.4k
compiler: replace few consts arrays with statics to remove const dupes #136191
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
Conversation
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
These commits modify compiler targets. |
probably no perf implications? @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
compiler: replace few consts arrays with statics to remove const dupes Locally on `x86_64-pc-windows-msvc` -100kb for `rustc_driver.dll`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (3e5336e): comparison URL. Overall result: ❌✅ regressions and improvements - no 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. @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.9%, secondary 1.0%)This 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.
CyclesResults (primary 3.0%, secondary -0.2%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 773.088s -> 773.417s (0.04%) |
Less effect on linux target, about ~50kb, until next size increase, when alignment will strike back. @rustbot ready |
@bors r+ rollup |
compiler: replace few consts arrays with statics to remove const dupes Locally on `x86_64-pc-windows-msvc` -100kb for `rustc_driver.dll`
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#135973 (fix tail call checks wrt `#[track_caller]`) - rust-lang#136191 (compiler: replace few consts arrays with statics to remove const dupes) - rust-lang#136565 (compiler: Clean up weird `rustc_abi` reexports) - rust-lang#136582 (Revert "CI: build FreeBSD artifacts on FreeBSD 13.4") - rust-lang#136592 (Make sure we don't overrun the stack in canonicalizer) - rust-lang#136627 (MIR validation: add comment explaining the limitations of CfgChecker) - rust-lang#136634 (Stabilise `Cursor::{get_mut, set_position}` in `const` scenarios.) - rust-lang#136643 (ping me for attribute-related changes) - rust-lang#136644 (Add `rustc_hir_pretty::item_to_string` function) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#135973 (fix tail call checks wrt `#[track_caller]`) - rust-lang#136191 (compiler: replace few consts arrays with statics to remove const dupes) - rust-lang#136565 (compiler: Clean up weird `rustc_abi` reexports) - rust-lang#136582 (Revert "CI: build FreeBSD artifacts on FreeBSD 13.4") - rust-lang#136627 (MIR validation: add comment explaining the limitations of CfgChecker) - rust-lang#136634 (Stabilise `Cursor::{get_mut, set_position}` in `const` scenarios.) - rust-lang#136643 (ping me for attribute-related changes) - rust-lang#136644 (Add `rustc_hir_pretty::item_to_string` function) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136191 - klensy:const_a, r=compiler-errors compiler: replace few consts arrays with statics to remove const dupes Locally on `x86_64-pc-windows-msvc` -100kb for `rustc_driver.dll`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So randomly about half the arrays in this file are now const
and the other half is static
. And there's no comment explaining the reason behind this, or what one should do when adding more elements to one of these arrays, or when adding a new array. I am quite confused...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any subjectively "big" arrays become static
s, while short ones with few elements left as they was. They still can be converted into statics, but at time of this pr, it wasn't worth it.
Locally on
x86_64-pc-windows-msvc
-100kb forrustc_driver.dll