-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Load all builtin targets at once instead of one by one in check-cfg #137072
Conversation
r? @Noratrieb rustbot has assigned @Noratrieb. Use |
These commits modify compiler targets. |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…e, r=<try> Load all builtin targets at once instead of one by one in check-cfg This PR adds a method on `rustc_target::Target` to load all the builtin targets at once, and then uses that method when constructing the `target_*` values in check-cfg instead of load loading each target one by one by their name, which requires a lookup. This may give us some performance improvements as we won't need to do the lookup for the _currently_ 287 targets we have.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (20bc5f6): 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 2.9%, secondary 3.1%)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 (secondary 4.1%)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: missing data |
This should give us some performance improvements as we won't need to do the lookup for the _currently_ 287 targets we have.
5ce8335
to
6ec3cf9
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…e, r=<try> Load all builtin targets at once instead of one by one in check-cfg This PR adds a method on `rustc_target::Target` to load all the builtin targets at once, and then uses that method when constructing the `target_*` values in check-cfg instead of load loading each target one by one by their name, which requires a lookup and was more of a hack anyway. This may give us some performance improvements as we won't need to do the lookup for the _currently_ 287 targets we have.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (86f627b): comparison URL. Overall result: ✅ 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 -2.1%)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%)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: 789.995s -> 790.069s (0.01%) |
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.
Doesn't look like it helps performance, but I think it's in an improvement to the code nevertheless.
@bors r+ |
@bors rollup |
…nce, r=Noratrieb Load all builtin targets at once instead of one by one in check-cfg This PR adds a method on `rustc_target::Target` to load all the builtin targets at once, and then uses that method when constructing the `target_*` values in check-cfg instead of load loading each target one by one by their name, which requires a lookup and was more of a hack anyway. This may give us some performance improvements as we won't need to do the lookup for the _currently_ 287 targets we have.
…nce, r=Noratrieb Load all builtin targets at once instead of one by one in check-cfg This PR adds a method on `rustc_target::Target` to load all the builtin targets at once, and then uses that method when constructing the `target_*` values in check-cfg instead of load loading each target one by one by their name, which requires a lookup and was more of a hack anyway. This may give us some performance improvements as we won't need to do the lookup for the _currently_ 287 targets we have.
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#125087 (Optimize `Seek::stream_len` impl for `File`) - rust-lang#136986 (Apply unsafe_op_in_unsafe_fn to the standard library) - rust-lang#137012 (add docs and ut for bootstrap util cc-detect) - rust-lang#137072 (Load all builtin targets at once instead of one by one in check-cfg) - rust-lang#137102 (Rework `name_regions` to not rely on reverse scc graph for non-member-constrain usages) - rust-lang#137112 (Don't project into `NonNull` when dropping a `Box`) - rust-lang#137114 (Add an example for `std::error::Error`) - rust-lang#137117 (Fix test that relies on error language) - rust-lang#137119 (fix broken `x {doc, build} core`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#136986 (Apply unsafe_op_in_unsafe_fn to the standard library) - rust-lang#137012 (add docs and ut for bootstrap util cc-detect) - rust-lang#137072 (Load all builtin targets at once instead of one by one in check-cfg) - rust-lang#137102 (Rework `name_regions` to not rely on reverse scc graph for non-member-constrain usages) - rust-lang#137112 (Don't project into `NonNull` when dropping a `Box`) - rust-lang#137114 (Add an example for `std::error::Error`) - rust-lang#137117 (Fix test that relies on error language) - rust-lang#137119 (fix broken `x {doc, build} core`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137072 - Urgau:check-cfg-load-builtins-at-once, r=Noratrieb Load all builtin targets at once instead of one by one in check-cfg This PR adds a method on `rustc_target::Target` to load all the builtin targets at once, and then uses that method when constructing the `target_*` values in check-cfg instead of load loading each target one by one by their name, which requires a lookup and was more of a hack anyway. This may give us some performance improvements as we won't need to do the lookup for the _currently_ 287 targets we have.
This PR adds a method on
rustc_target::Target
to load all the builtin targets at once, and then uses that method when constructing thetarget_*
values in check-cfg instead of load loading each target one by one by their name, which requires a lookup and was more of a hack anyway.This may give us some performance improvements as we won't need to do the lookup for the currently 287 targets we have.