Skip to content

Cache supertrait outlives of impl header for soundness check #128746

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
Aug 10, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 6, 2024

This caches the results of computing the transitive supertraits of an impl and filtering it to its outlives obligations. This is purely an optimization to improve #124336.

@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 Aug 6, 2024
@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 Aug 6, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 6, 2024
…, r=<try>

[perf] Cache supertrait outlives of impl header for soundness check

Try to win back some perf from rust-lang#124336 (comment)

r? `@ghost`
@bors
Copy link
Collaborator

bors commented Aug 6, 2024

⌛ Trying commit 7922852 with merge 5be154b...

@bors
Copy link
Collaborator

bors commented Aug 6, 2024

☀️ Try build successful - checks-actions
Build commit: 5be154b (5be154bd2b4d880f623f032aa79511f15898167d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5be154b): 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.1% [0.1%, 0.2%] 3
Improvements ✅
(primary)
-0.6% [-1.2%, -0.2%] 66
Improvements ✅
(secondary)
-1.6% [-3.9%, -0.2%] 37
All ❌✅ (primary) -0.6% [-1.2%, -0.2%] 66

Max RSS (memory usage)

Results (primary -1.4%, secondary -1.4%)

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.8% [0.9%, 5.2%] 3
Improvements ✅
(primary)
-1.4% [-3.1%, -0.4%] 4
Improvements ✅
(secondary)
-3.9% [-5.2%, -3.1%] 5
All ❌✅ (primary) -1.4% [-3.1%, -0.4%] 4

Cycles

Results (primary -1.6%, secondary -3.7%)

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.6% [-2.7%, -0.8%] 11
Improvements ✅
(secondary)
-3.7% [-5.6%, -2.0%] 21
All ❌✅ (primary) -1.6% [-2.7%, -0.8%] 11

Binary size

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

Bootstrap: 760.99s -> 757.42s (-0.47%)
Artifact size: 336.87 MiB -> 336.84 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 6, 2024
@compiler-errors compiler-errors changed the title [perf] Cache supertrait outlives of impl header for soundness check Cache supertrait outlives of impl header for soundness check Aug 8, 2024
@compiler-errors
Copy link
Member Author

r? @lcnr

@lcnr
Copy link
Contributor

lcnr commented Aug 8, 2024

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Aug 8, 2024

📌 Commit 7922852 has been approved by lcnr

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 Aug 8, 2024
@bors
Copy link
Collaborator

bors commented Aug 10, 2024

⌛ Testing commit 7922852 with merge 48090b1...

@bors
Copy link
Collaborator

bors commented Aug 10, 2024

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 48090b1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 10, 2024
@bors bors merged commit 48090b1 into rust-lang:master Aug 10, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 10, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (48090b1): 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.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
-0.5% [-1.3%, -0.2%] 69
Improvements ✅
(secondary)
-1.8% [-3.8%, -0.2%] 30
All ❌✅ (primary) -0.5% [-1.3%, 0.2%] 70

Max RSS (memory usage)

Results (primary -0.8%, secondary -3.2%)

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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
-1.2% [-1.4%, -1.2%] 3
Improvements ✅
(secondary)
-4.4% [-5.8%, -2.8%] 5
All ❌✅ (primary) -0.8% [-1.4%, 0.5%] 4

Cycles

Results (primary -1.0%, secondary -3.3%)

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.0% [-1.1%, -0.8%] 3
Improvements ✅
(secondary)
-3.3% [-4.2%, -2.4%] 14
All ❌✅ (primary) -1.0% [-1.1%, -0.8%] 3

Binary size

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

Bootstrap: 762.637s -> 760.23s (-0.32%)
Artifact size: 339.23 MiB -> 339.28 MiB (0.01%)

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.

5 participants