Skip to content
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 DefIds in region resolution #122824

Merged
merged 1 commit into from Mar 22, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 21, 2024

hopefully maintains the perf improvement from #118824

works towards #90317

@rustbot
Copy link
Collaborator

rustbot commented Mar 21, 2024

r? @estebank

rustbot has assigned @estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 21, 2024

@bors try @rust-timer queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 21, 2024
@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 21, 2024
@bors
Copy link
Contributor

bors commented Mar 21, 2024

⌛ Trying commit a6bcb91 with merge fe2490b...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2024
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);
Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Contributor Author

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

Copy link
Member

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 🙂

@bors
Copy link
Contributor

bors commented Mar 21, 2024

☀️ Try build successful - checks-actions
Build commit: fe2490b (fe2490b4373e426ea3d5b0c93cd2d54ef7feaa36)

@rust-timer

This comment has been minimized.

@michaelwoerister
Copy link
Member

r=me if performance isn't impacted too much.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fe2490b): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking 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
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 3
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) -0.8% [-0.8%, -0.8%] 3

Max RSS (memory usage)

Results

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-4.6%, -2.0%] 29
All ❌✅ (primary) - - 0

Cycles

Results

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 672.146s -> 670.816s (-0.20%)
Artifact size: 314.90 MiB -> 314.93 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 21, 2024
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 21, 2024

@bors r=estebank,michaelwoerister

@bors
Copy link
Contributor

bors commented Mar 21, 2024

📌 Commit a6bcb91 has been approved by estebank,michaelwoerister

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 21, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 21, 2024

@bors r- gotta fix the seen map

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 21, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 21, 2024

@bors rollup, all the perf changes are the same amplitude as the frequent perf changes recently, so it's just noise

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 21, 2024

@bors r=estebank,michaelwoerister

@bors
Copy link
Contributor

bors commented Mar 21, 2024

📌 Commit 208582f has been approved by estebank,michaelwoerister

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2024
Remove `DefId`'s `Partial/Ord` impls

work towards rust-lang#90317

based on rust-lang#122824 and rust-lang#122820

r? `@michaelwoerister`
@bors
Copy link
Contributor

bors commented Mar 22, 2024

⌛ Testing commit 208582f with merge eb80be2...

@bors
Copy link
Contributor

bors commented Mar 22, 2024

☀️ Test successful - checks-actions
Approved by: estebank,michaelwoerister
Pushing eb80be2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 22, 2024
@bors bors merged commit eb80be2 into rust-lang:master Mar 22, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 22, 2024
@oli-obk oli-obk deleted the no_ord_def_id2 branch March 22, 2024 10:28
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (eb80be2): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.0%, -1.0%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 669.214s -> 669.305s (0.01%)
Artifact size: 314.92 MiB -> 315.01 MiB (0.03%)

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 28, 2024
…rister

Remove `DefId`'s `Partial/Ord` impls

work towards rust-lang#90317

based on rust-lang#122824 and rust-lang#122820

r? `@michaelwoerister`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants