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

Streamline fast rejection #109367

Merged
merged 3 commits into from
Mar 29, 2023
Merged

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Mar 19, 2023

Some reworkings of this code that make it a little nicer.

r? @lcnr

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Mar 19, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 19, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@nnethercote
Copy link
Contributor Author

Best reviewed one commit at a time.

@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 Mar 19, 2023
@bors
Copy link
Contributor

bors commented Mar 19, 2023

⌛ Trying commit fbd4c7514c40074c88176cb0be03d8c8af46f764 with merge 6d89e3f3b105505a8cfe2eff22c4fbbf6c669a54...

@bors
Copy link
Contributor

bors commented Mar 20, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6d89e3f3b105505a8cfe2eff22c4fbbf6c669a54): comparison URL.

Overall result: ❌ regressions - 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)
1.7% [1.1%, 2.4%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [-0.5%, 2.4%] 8

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.8% [0.6%, 0.9%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-1.9%, -0.7%] 2
Improvements ✅
(secondary)
-3.2% [-3.7%, -2.7%] 2
All ❌✅ (primary) -0.3% [-1.9%, 0.9%] 4

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.7% [0.5%, 0.8%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [-0.7%, 0.8%] 4

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 20, 2023
@nnethercote
Copy link
Contributor Author

Hmm, surprising results. Those 1-2% regressions for bitmaps were all 1-2% wins locally. Maybe due to PGO? Let's try something slightly different.

@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 Mar 20, 2023
@bors
Copy link
Contributor

bors commented Mar 20, 2023

⌛ Trying commit 3f1c92221deb427539b4dc017eb0a235fbb3fb2c with merge 78def68c90d6be15e89aab52faf5d960f0be0ac4...

@bors
Copy link
Contributor

bors commented Mar 20, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (78def68c90d6be15e89aab52faf5d960f0be0ac4): comparison URL.

Overall result: ❌ regressions - 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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.4%, 0.4%] 1

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)
2.3% [0.5%, 3.8%] 6
Regressions ❌
(secondary)
2.8% [1.0%, 5.3%] 75
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [-0.7%, 3.8%] 7

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.8% [0.7%, 0.9%] 2
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.7%, 0.9%] 2

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Mar 20, 2023
@nnethercote
Copy link
Contributor Author

So, perf is neutral now. (I will assume the supposed max-rss regressions are noise, because there is no reason why this change should have that effect.) This PR is now just about making the code a little nicer.

@compiler-errors
Copy link
Member

r? @compiler-errors @bors r+

@bors
Copy link
Contributor

bors commented Mar 28, 2023

📌 Commit 3f1c92221deb427539b4dc017eb0a235fbb3fb2c has been approved by compiler-errors

It is now in the queue for this repository.

@rustbot rustbot assigned compiler-errors and unassigned lcnr Mar 28, 2023
@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 28, 2023
@compiler-errors
Copy link
Member

f*** wait there's a merge conflict

@bors r-

r=me

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

bors commented Mar 28, 2023

☔ The latest upstream changes (presumably #109561) made this pull request unmergeable. Please resolve the merge conflicts.

@nnethercote nnethercote changed the title Optimize fast rejection Streamline fast rejection Mar 28, 2023
It factors out a repeated code pattern.
Because it has a single call site, and it lets us move a small amount of
the work outside the loop.
@nnethercote
Copy link
Contributor Author

@bors r=compiler-errors rollup

@bors
Copy link
Contributor

bors commented Mar 28, 2023

📌 Commit 0392366 has been approved by compiler-errors

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 28, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#109149 (Improve error message when writer is forgotten in write and writeln macro)
 - rust-lang#109367 (Streamline fast rejection)
 - rust-lang#109548 (AnnotationColumn struct to fix hard tab column numbers in errors)
 - rust-lang#109694 (do not panic on failure to acquire jobserver token)
 - rust-lang#109705 (new solver: check for intercrate mode when accessing the cache)
 - rust-lang#109708 (Specialization involving RPITITs is broken so ignore the diagnostic differences)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ba21643 into rust-lang:master Mar 29, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 29, 2023
@nnethercote nnethercote deleted the opt-fast-rejection branch March 29, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants