-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Only compute Obligation cache_key
once in register_obligation_at
#84923
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 4bd5505 with merge 8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78... |
☀️ Try build successful - checks-actions |
Queued 8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78 with parent dc5f2cd, future comparison URL. |
Finished benchmarking try commit (8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Perf looks like noise :/ |
Still makes sense as a minor cleanup. |
📌 Commit 4bd5505 has been approved by |
…chenkov Only compute Obligation `cache_key` once in `register_obligation_at`
…chenkov Only compute Obligation `cache_key` once in `register_obligation_at`
…chenkov Only compute Obligation `cache_key` once in `register_obligation_at`
Rollup of 8 pull requests Successful merges: - rust-lang#83507 (Implement RFC 2951: Native link modifiers) - rust-lang#84328 (Stablize {HashMap,BTreeMap}::into_{keys,values}) - rust-lang#84712 (Simplify chdir implementation and minimize unsafe block) - rust-lang#84851 (:arrow_up: rust-analyzer) - rust-lang#84923 (Only compute Obligation `cache_key` once in `register_obligation_at`) - rust-lang#84945 (E0583: Include secondary path in error message) - rust-lang#84949 (Fix typo in `MaybeUninit::array_assume_init` safety comment) - rust-lang#84950 (Revert PR 83866) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
@@ -365,7 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> { | |||
&& self | |||
.error_cache | |||
.get(&obligation_tree_id) | |||
.map(|errors| errors.contains(&obligation.as_cache_key())) | |||
.map(|errors| errors.contains(&cache_key)) |
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.
this can be v.key(), allowing the clone on line 345 to be elided.
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.
No description provided.