-
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
Remove allow(rustc::potential_query_instability) in rustc_trait_selection #103723
Conversation
r? @fee1-dead (rustbot 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 c16a32665a417595b1a1fca4121fed423964a27f with merge 752ad3e20a11e4a43bb87b73b85ebb28b2b321c4... |
@rust-timer build 752ad3e20a11e4a43bb87b73b85ebb28b2b321c4 |
Queued 752ad3e20a11e4a43bb87b73b85ebb28b2b321c4 with parent 33b530e, future comparison URL. |
Finished benchmarking commit (752ad3e20a11e4a43bb87b73b85ebb28b2b321c4): comparison URL. Overall result: ❌ regressions - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
|
I guess that's not good enough. Not really sure how it can be improved though |
I am not very good at interpreting perf results so I don't know how to improve this further. Rerolling r? compiler |
I think it could be better now Edit: No, it wasn't. I'm out of ideas. The |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #103991) made this pull request unmergeable. Please resolve the merge conflicts. |
@@ -2626,11 +2627,13 @@ impl<'tcx> ProvisionalEvaluationCache<'tcx> { | |||
fn on_completion(&self, dfn: usize) { | |||
debug!(?dfn, "on_completion"); | |||
|
|||
// If IndexMap gets the `drain_filter` method this could be done in one iteration |
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.
Can we try a perf run with all the other changes except for this?
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.
Yes! I changed the branch.
FWIW, I find it easier to just add a commit when doing perf comparisons (so it's easier to see exact changes) @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 48a76e3fa554064df86f2a2fc039f08d0e2ebc29 with merge df3b01ab5b018aef79cd5650f36b7024e7527092... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (df3b01ab5b018aef79cd5650f36b7024e7527092): 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 a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
|
Okay, so. Maybe we land this set of changes first. And then land a followup for the bit that regresses perf? |
Yes, that seems easier. I also realized that I initially had a separate commit for those changes. The next time I will probably wait for the approval before squashing.
Okay. I guess I need to change the commit description. Do I mark the parts that will change with the followup in some special way or do I leave the FIXMEs as they are now? |
I think I move the allow to the top of the file with a single FIXME explaining perf effect and need to drain_filter on IndexMap |
94a8179
to
a706d93
Compare
Okay, I changed that and rebased the branch! |
…c_trait_selection Make InferCtxtExt use a FxIndexMap This should be faster, because the map is only being used to iterate, which is supposed to be faster with the IndexMap Make the user_computed_preds use an IndexMap It is being used mostly for iteration, so the change shouldn't result in a perf hit Make the RegionDeps fields use an IndexMap This change could be a perf hit. Both `larger` and `smaller` are used for iteration, but they are also used for insertions. Make types_without_default_bounds use an IndexMap It uses extend, but it also iterates and removes items. Not sure if this will be a perf hit. Make InferTtxt.reported_trait_errors use an IndexMap This change brought a lot of other changes. The map seems to have been mostly used for iteration, so the performance shouldn't suffer. Add FIXME to change ProvisionalEvaluationCache.map to use an IndexMap Right now this results in a perf hit. IndexMap doesn't have the `drain_filter` API, so in `on_completion` we now need to iterate two times over the map.
Thanks! @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (cc9b259): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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. |
Related to #84447
This PR needs to be benchmarked to check for regressions.