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

Rewrite UnDerefer, again #113316

Merged
merged 2 commits into from Jul 11, 2023
Merged

Rewrite UnDerefer, again #113316

merged 2 commits into from Jul 11, 2023

Conversation

beepster4096
Copy link
Contributor

This PR is intended to improve the perf regression introduced by #112882.

UnDerefer has been separated out again for borrowck reasons. It was a bit overzealous to remove it in the previous PR.

r? @oli-obk

@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 Jul 4, 2023
@Nilstrieb
Copy link
Member

@bors try @rust-timer queue

@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 Jul 4, 2023
@bors
Copy link
Contributor

bors commented Jul 4, 2023

⌛ Trying commit 3bfe67bcb4b307e7b43ef00401dc128de27518bb with merge 28c7baba04b2d4e963bbaf5cac50cfdca5783788...

@beepster4096 beepster4096 mentioned this pull request Jul 4, 2023
@bors
Copy link
Contributor

bors commented Jul 4, 2023

☀️ Try build successful - checks-actions
Build commit: 28c7baba04b2d4e963bbaf5cac50cfdca5783788 (28c7baba04b2d4e963bbaf5cac50cfdca5783788)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (28c7baba04b2d4e963bbaf5cac50cfdca5783788): comparison URL.

Overall result: no relevant changes - 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 benchmark run did not return any relevant results for this metric.

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)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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: 670.369s -> 670.442s (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 4, 2023
@saethlin
Copy link
Member

saethlin commented Jul 8, 2023

@bors try @rust-timer queue

@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 Jul 8, 2023
@bors
Copy link
Contributor

bors commented Jul 8, 2023

⌛ Trying commit 45b855a240cf757fc03d60c34dba097c79974c1f with merge e342bc1fa19fc3c6a3f59f83ec524410b8d195bb...

@bors
Copy link
Contributor

bors commented Jul 8, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e342bc1fa19fc3c6a3f59f83ec524410b8d195bb): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@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.9% [0.6%, 1.1%] 6
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
-1.0% [-1.7%, -0.5%] 11
Improvements ✅
(secondary)
-1.4% [-1.9%, -0.3%] 20
All ❌✅ (primary) -0.3% [-1.7%, 1.1%] 17

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)
-1.9% [-2.1%, -1.8%] 4
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)
-2.3% [-4.0%, -1.1%] 7
Improvements ✅
(secondary)
-3.1% [-3.8%, -1.5%] 13
All ❌✅ (primary) -2.3% [-4.0%, -1.1%] 7

Binary size

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

Bootstrap: 655.85s -> 654.533s (-0.20%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 8, 2023
@beepster4096 beepster4096 marked this pull request as ready for review July 8, 2023 06:17
@beepster4096
Copy link
Contributor Author

The regressions seem to come from query/incr comp code while the improvements seem to be actually faster in drop elaboration and borrowck.

Copy link
Contributor

@oli-obk oli-obk 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 with the second commit given a description

- moved work from `find_local` to `gather_statement`
- created custom iterator for `iter_projections`
- reverted change from `IndexVec` to `FxIndexMap`
@beepster4096
Copy link
Contributor Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Jul 11, 2023

@drmeepster: 🔑 Insufficient privileges: Not in reviewers

@beepster4096
Copy link
Contributor Author

Whoops, forgot I didn't get delegate+'d on this pr 😅

@saethlin
Copy link
Member

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Jul 11, 2023

📌 Commit b0dbd60 has been approved by oli-obk

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 Jul 11, 2023
@bors
Copy link
Contributor

bors commented Jul 11, 2023

⌛ Testing commit b0dbd60 with merge 5b733e2...

@bors
Copy link
Contributor

bors commented Jul 11, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 5b733e2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 11, 2023
@bors bors merged commit 5b733e2 into rust-lang:master Jul 11, 2023
12 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5b733e2): 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)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.9% [-1.7%, -0.4%] 14
Improvements ✅
(secondary)
-1.2% [-2.0%, -0.2%] 21
All ❌✅ (primary) -0.8% [-1.7%, 1.2%] 15

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)
5.1% [5.1%, 5.1%] 1
Improvements ✅
(primary)
-2.6% [-3.2%, -2.0%] 2
Improvements ✅
(secondary)
-2.1% [-2.8%, -1.4%] 6
All ❌✅ (primary) -2.6% [-3.2%, -2.0%] 2

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)
-1.4% [-1.9%, -0.6%] 5
Improvements ✅
(secondary)
-3.5% [-4.0%, -2.0%] 11
All ❌✅ (primary) -1.4% [-1.9%, -0.6%] 5

Binary size

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

Bootstrap: 658.383s -> 657.463s (-0.14%)

@rustbot rustbot removed the perf-regression Performance regression. label Jul 11, 2023
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

7 participants