1

Stop sorting via `DefId`s in region resolution by oli-obk · Pull Request #122824...

 1 month ago
source link: https://github.com/rust-lang/rust/pull/122824
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Stop sorting via DefIds in region resolution #122824

Conversation

Contributor

hopefully maintains the perf improvement from #118824

works towards #90317

Collaborator

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

Contributor

Author

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

This comment has been minimized.

rustbot

added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

Mar 21, 2024

Contributor

⌛ Trying commit a6bcb91 with merge fe2490b...

@@ -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);

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.

Contributor

Author

doesn't that have the same insertion issues as #118824 (comment) (expensive to insert)

Contributor

Author

or do you mean for the dedup set? sure, that doesn't matter

Yeah, I meant the seen set. The comment ended up in an ambiguous place 🙂

Contributor

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

This comment has been minimized.

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

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

Cycles

Results

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%)

oli-obk reacted with laugh emoji

rustbot

removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

Mar 21, 2024

Contributor

@estebank estebank

left a comment

Contributor

Author

@bors r=estebank,michaelwoerister

Contributor

📌 Commit a6bcb91 has been approved by estebank,michaelwoerister

It is now in the queue for this repository.

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

Contributor

Author

@bors r- gotta fix the seen map

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

Contributor

Author

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

Contributor

Author

@bors r=estebank,michaelwoerister

Contributor

📌 Commit 208582f has been approved by estebank,michaelwoerister

It is now in the queue for this repository.

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

Contributor

⌛ Testing commit 208582f with merge eb80be2...

Contributor

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

bors

added the merged-by-bors This PR was explicitly merged by bors label

Mar 22, 2024

bors

merged commit eb80be2 into

rust-lang:master

Mar 22, 2024

12 checks passed

oli-obk

deleted the no_ord_def_id2 branch

March 22, 2024 10:28

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%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

michaelwoerister

michaelwoerister left review comments

estebank

estebank approved these changes
Assignees

estebank

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

Milestone

1.79.0

Development

Successfully merging this pull request may close these issues.

None yet

6 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK