-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Avoid a reverse map that is only used in diagnostics paths #139584
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.
Avoid a reverse map that is only used in diagnostics paths r? `@ghost` iterating a map until a value matches and returning the key is bad obviously, but it happens very rarely and only on diagnostics paths. It would also be a lot cheaper with rust-lang#138995. Which is actually why I'm trying this out, that PR adds a new entry in `create_def`, which makes `create_def` show up in cachegrind. So I'm trying out if removing adding an entry in `create_def` is a perf improvement
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (a6c5ab5): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @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.3%, secondary -0.6%)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 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: 779.721s -> 780.693s (0.12%) |
e4bd751
to
ae8c33c
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Avoid a reverse map that is only used in diagnostics paths r? `@ghost` iterating a map until a value matches and returning the key is bad obviously, but it happens very rarely and only on diagnostics paths. It would also be a lot cheaper with rust-lang#138995. Which is actually why I'm trying this out, that PR adds a new entry in `create_def`, which makes `create_def` show up in cachegrind. So I'm trying out if removing adding an entry in `create_def` is a perf improvement
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (40f4c1b): 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.5%, 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 780.636s -> 779.061s (-0.20%) |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
ae8c33c
to
fa73472
Compare
r=me with #139584 (comment) addressed. |
Reminder, once the PR becomes ready for a review, use |
fa73472
to
2662495
Compare
2662495
to
98d51fb
Compare
@rustbot ready |
@bors r+ |
@bors rollup=maybe |
Rollup of 7 pull requests Successful merges: - rust-lang#137835 (Use `BinOp::Cmp` for `iNN::signum`) - rust-lang#139584 (Avoid a reverse map that is only used in diagnostics paths) - rust-lang#139638 (Cleanup the `InstSimplify` MIR transformation) - rust-lang#139653 (Handle a negated literal in `eat_token_lit`.) - rust-lang#139662 (Tweak `DefPathData`) - rust-lang#139664 (Reuse address-space computation from global alloc) - rust-lang#139687 (Add spastorino to users_on_vacation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139584 - oli-obk:horrible-experiment-1, r=petrochenkov Avoid a reverse map that is only used in diagnostics paths r? `@petrochenkov` iterating a map until a value matches and returning the key is bad obviously, but it happens very rarely and only on diagnostics paths. It would also be a lot cheaper with rust-lang#138995. Which is actually why I'm trying this out, that PR adds a new entry in `create_def`, which makes `create_def` show up in cachegrind. So I'm trying out if removing adding an entry in `create_def` is a perf improvement
r? @petrochenkov
iterating a map until a value matches and returning the key is bad obviously, but it happens very rarely and only on diagnostics paths. It would also be a lot cheaper with #138995. Which is actually why I'm trying this out, that PR adds a new entry in
create_def
, which makescreate_def
show up in cachegrind. So I'm trying out if removing adding an entry increate_def
is a perf improvement