-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[EXPERIMENT] Remove static booleans from rustc_query_impl::DynamicConfig
#151633
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
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Remove static booleans from `rustc_query_impl::DynamicConfig`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (8ad1208): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @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.7%, secondary -1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.6%, secondary -0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 471.746s -> 470.583s (-0.25%) |
|
Hmm, small but measurable regressions across the board. |
|
I think my takeaway here is that we could afford to take this hit if we had a specific reason (e.g. unblocking other work), but general cleanup is perhaps not quite compelling enough on its own. |
|
@Zalathar |
|
Oh nice. I have a local branch where I tried to simulate const-generic structs using traits and macros, but being able to use an actual struct would be nicer. |
…rcote Use `#![feature(adt_const_params)]` for static query flags As suggested by rust-lang#151633 (comment), this replaces multiple clunky const booleans with a single const struct, which is a bit nicer. This should also make it easier to experiment with statically resolving other flags, like `eval_always`. There are currently no other compiler crates using `feature(adt_const_params)`, so hopefully it's mature enough for a simple use-case like this one.
…rcote Use `#![feature(adt_const_params)]` for static query flags As suggested by rust-lang#151633 (comment), this replaces multiple clunky const booleans with a single const struct, which is a bit nicer. This should also make it easier to experiment with statically resolving other flags, like `eval_always`. There are currently no other compiler crates using `feature(adt_const_params)`, so hopefully it's mature enough for a simple use-case like this one.
…rcote Use `#![feature(adt_const_params)]` for static query flags As suggested by rust-lang#151633 (comment), this replaces multiple clunky const booleans with a single const struct, which is a bit nicer. This should also make it easier to experiment with statically resolving other flags, like `eval_always`. There are currently no other compiler crates using `feature(adt_const_params)`, so hopefully it's mature enough for a simple use-case like this one.
…rcote Use `#![feature(adt_const_params)]` for static query flags As suggested by rust-lang#151633 (comment), this replaces multiple clunky const booleans with a single const struct, which is a bit nicer. This should also make it easier to experiment with statically resolving other flags, like `eval_always`. There are currently no other compiler crates using `feature(adt_const_params)`, so hopefully it's mature enough for a simple use-case like this one.
Rollup merge of #151938 - Zalathar:adt-query-flags, r=nnethercote Use `#![feature(adt_const_params)]` for static query flags As suggested by #151633 (comment), this replaces multiple clunky const booleans with a single const struct, which is a bit nicer. This should also make it easier to experiment with statically resolving other flags, like `eval_always`. There are currently no other compiler crates using `feature(adt_const_params)`, so hopefully it's mature enough for a simple use-case like this one.
Checking the bootstrap-perf and compiler-perf implications of getting rid of the intermediate
DynamicConfiglayer.r? ghost