Skip to content

Only cache typeck results if it's the typeck root #111026

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

Merged
merged 1 commit into from
May 1, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Apr 30, 2023

context: https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/incr_comp_query_cache_promotion.20taking.20forever

Basically, typeck children just copy the typeck results of their typeck root item, so caching their results means copying the same typeck results for each child item.

r? @ghost

@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 Apr 30, 2023
@compiler-errors
Copy link
Member Author

@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 Apr 30, 2023
@bors
Copy link
Collaborator

bors commented Apr 30, 2023

⌛ Trying commit 938e807 with merge 0a3b79d20cb328b650c2c0a95cd1227e540734ff...

@bors
Copy link
Collaborator

bors commented Apr 30, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0a3b79d20cb328b650c2c0a95cd1227e540734ff): 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)
-1.8% [-7.9%, -0.4%] 62
Improvements ✅
(secondary)
-4.4% [-11.6%, -1.0%] 13
All ❌✅ (primary) -1.8% [-7.9%, -0.4%] 62

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)
-3.7% [-8.3%, -0.5%] 36
Improvements ✅
(secondary)
-4.9% [-5.0%, -4.8%] 3
All ❌✅ (primary) -3.7% [-8.3%, -0.5%] 36

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.5% [-5.6%, -1.2%] 15
Improvements ✅
(secondary)
-5.0% [-8.4%, -2.6%] 7
All ❌✅ (primary) -2.5% [-5.6%, -1.2%] 15

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2023
@compiler-errors compiler-errors marked this pull request as ready for review May 1, 2023 04:08
@compiler-errors
Copy link
Member Author

r? compiler

@cjgillot
Copy link
Contributor

cjgillot commented May 1, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented May 1, 2023

📌 Commit 938e807 has been approved by cjgillot

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 May 1, 2023
@bors
Copy link
Collaborator

bors commented May 1, 2023

⌛ Testing commit 938e807 with merge 4b87ed9...

@bjorn3
Copy link
Member

bjorn3 commented May 1, 2023

It's not just performance that improves significantly because of this change, but there is also a significant reduction in memory usage. And the query cache size is reduced by as much as 50% in some cases like serde.

@bors
Copy link
Collaborator

bors commented May 1, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 4b87ed9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 1, 2023
@bors bors merged commit 4b87ed9 into rust-lang:master May 1, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 1, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4b87ed9): 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)
-1.8% [-7.9%, -0.4%] 62
Improvements ✅
(secondary)
-4.6% [-11.5%, -1.0%] 12
All ❌✅ (primary) -1.8% [-7.9%, -0.4%] 62

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)
-3.6% [-8.2%, -0.7%] 30
Improvements ✅
(secondary)
-4.5% [-4.8%, -4.1%] 3
All ❌✅ (primary) -3.6% [-8.2%, -0.7%] 30

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)
3.6% [2.8%, 4.7%] 3
Improvements ✅
(primary)
-2.7% [-6.4%, -1.0%] 18
Improvements ✅
(secondary)
-5.1% [-8.7%, -2.1%] 6
All ❌✅ (primary) -2.7% [-6.4%, -1.0%] 18

Binary size

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

Bootstrap: 655.48s -> 656.925s (0.22%)

@compiler-errors compiler-errors deleted the only-typeck-root branch August 11, 2023 20:12
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.

7 participants