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

Make DeepRejectCtxt symmetric with respect to TreatParams #129051

Closed

Conversation

Bryanskiy
Copy link
Contributor

The PR was split from #128776

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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 13, 2024
@lcnr
Copy link
Contributor

lcnr commented Aug 13, 2024

thanks

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

Make `DeepRejectCtxt` symmetric with respect to `TreatParams`

The PR was split from rust-lang#128776

r? `@lcnr`
@bors
Copy link
Contributor

bors commented Aug 13, 2024

⌛ Trying commit 503fbd8 with merge 82992a0...

@bors
Copy link
Contributor

bors commented Aug 13, 2024

☀️ Try build successful - checks-actions
Build commit: 82992a0 (82992a0f092476a5c0200d1d14ae0647bcc6d13f)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (82992a0): 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)
3.2% [0.3%, 5.2%] 14
Regressions ❌
(secondary)
1.0% [1.0%, 1.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.2% [0.3%, 5.2%] 14

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 752.976s -> 753.56s (0.08%)
Artifact size: 341.40 MiB -> 341.43 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 13, 2024
@Bryanskiy
Copy link
Contributor Author

In the latest commit, micro-optimizations from the comment were added.

Comment on lines -189 to +185
pub struct DeepRejectCtxt<I: Interner> {
treat_obligation_params: TreatParams,
pub struct DeepRejectCtxt<I: Interner, const TREAT_LHS_PARAMS: bool, const TREAT_RHS_PARAMS: bool> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use the adt_const_params here, but I'm not sure if that feature is allowed in rustc_type_ir.

@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Aug 16, 2024

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

Make `DeepRejectCtxt` symmetric with respect to `TreatParams`

The PR was split from rust-lang#128776

r? `@lcnr`
@bors
Copy link
Contributor

bors commented Aug 16, 2024

⌛ Trying commit 35ca8f8 with merge 1776c24...

@bors
Copy link
Contributor

bors commented Aug 16, 2024

☀️ Try build successful - checks-actions
Build commit: 1776c24 (1776c242d7fa26340d9153c7422c9ce23b871275)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1776c24): 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.2% [-0.2%, -0.2%] 2
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.2%] 5
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 2

Max RSS (memory usage)

Results (primary 4.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)
4.7% [4.7%, 4.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.7% [4.7%, 4.7%] 1

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: 751.027s -> 751.371s (0.05%)
Artifact size: 339.18 MiB -> 339.19 MiB (0.00%)

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Aug 16, 2024
@Bryanskiy
Copy link
Contributor Author

I also rewrote types_may_unify to match only over lhs as fewer branches are used.

before:

Range Mean Count
[-1.43%, -0.61%] -1.00% 12

after:

Range Mean Count
[ -2.02%,  -0.96%] -1.48% 12

@bors
Copy link
Contributor

bors commented Aug 20, 2024

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

@Bryanskiy
Copy link
Contributor Author

#128776 has landed

@Bryanskiy Bryanskiy closed this Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants