-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Stop sorting via DefId
s in region resolution
#122824
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Stop sorting via `DefId`s in region resolution hopefully maintains the perf improvement from rust-lang#118824 works towards rust-lang#90317
@@ -139,8 +139,8 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> { | |||
let mut var_data = self.construct_var_data(); | |||
|
|||
// Deduplicating constraints is shown to have a positive perf impact. | |||
self.data.constraints.sort_by_key(|(constraint, _)| *constraint); |
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.
Would you mind using an UnordSet here? It is a drop-in replacement in this case but guards against accidentally relying on its iteration order.
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 that have the same insertion issues as #118824 (comment) (expensive to insert)
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.
or do you mean for the dedup set? sure, that doesn't matter
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.
Yeah, I meant the seen
set. The comment ended up in an ambiguous place 🙂
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
r=me if performance isn't impacted too much. |
Finished benchmarking commit (fe2490b): 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.146s -> 670.816s (-0.20%) |
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.
r=me
@bors r=estebank,michaelwoerister |
@bors r- gotta fix the |
@bors rollup, all the perf changes are the same amplitude as the frequent perf changes recently, so it's just noise |
@bors r=estebank,michaelwoerister |
Remove `DefId`'s `Partial/Ord` impls work towards rust-lang#90317 based on rust-lang#122824 and rust-lang#122820 r? `@michaelwoerister`
☀️ Test successful - checks-actions |
Finished benchmarking commit (eb80be2): 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)This benchmark run did not return any relevant results for this metric. 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: 669.214s -> 669.305s (0.01%) |
…rister Remove `DefId`'s `Partial/Ord` impls work towards rust-lang#90317 based on rust-lang#122824 and rust-lang#122820 r? `@michaelwoerister`
hopefully maintains the perf improvement from #118824
works towards #90317