Nothing Special   »   [go: up one dir, main page]

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

Add constness to TraitDef #127200

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

fee1-dead
Copy link
Member

Second attempt at fixing the regression @ #120639 (comment)

r? project-const-traits

@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 1, 2024
@rustbot
Copy link
Collaborator
rustbot commented Jul 1, 2024

HIR ty lowering was modified

cc @fmease

@fee1-dead
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 Jul 1, 2024
@bors
Copy link
Contributor
bors commented Jul 1, 2024

⌛ Trying commit ee2d52a with merge 6cb3b57...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 1, 2024
…ait, r=<try>

Add `constness` to `TraitDef`

Second attempt at fixing the regression @ rust-lang#120639 (comment)

r? project-const-traits
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor
bors commented Jul 1, 2024

💔 Test failed - checks-actions

@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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2024
@fee1-dead
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 1, 2024
…ait, r=<try>

Add `constness` to `TraitDef`

Second attempt at fixing the regression @ rust-lang#120639 (comment)

r? project-const-traits
@bors
Copy link
Contributor
bors commented Jul 1, 2024

⌛ Trying commit 93b42fc with merge 576fbf8...

@bors
Copy link
Contributor
bors commented Jul 1, 2024

☀️ Try build successful - checks-actions
Build commit: 576fbf8 (576fbf8589d1c38cf150f37c8e69b276a6ec23c3)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (576fbf8): 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
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 3
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 3

Max RSS (memory usage)

Results (primary -6.7%, secondary -2.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)
-6.7% [-6.7%, -6.7%] 1
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) -6.7% [-6.7%, -6.7%] 1

Cycles

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

Binary size

Results (secondary 0.0%)

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

Bootstrap: 699.484s -> 695.977s (-0.50%)
Artifact size: 326.66 MiB -> 326.72 MiB (0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 1, 2024
Copy link
Member
@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

You should be able to set EncodeCrossCrate::No for const_trait, though I don't think it'll improve perf :/

@fee1-dead
Copy link
Member Author

You should be able to set EncodeCrossCrate::No for const_trait, though I don't think it'll improve perf :/

done

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 3, 2024
@fee1-dead
Copy link
Member Author

FWIW, I think this is a perf improvement. Looking at the details of the single perf regression seems to show more instructions being spent on loading incremental data. That might be because we added constness to TraitDef. But cycles doesn't have any significant changes so I think this should be fine.

Copy link
Member
@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

One question, r=me otherwise

@@ -1847,19 +1847,13 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
path.segments[..path.segments.len() - 2].iter(),
GenericsArgsErrExtend::None,
);
// HACK: until we support `<Type as ~const Trait>`, assume all of them are.
Copy link
Member

Choose a reason for hiding this comment

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

Why was this removed? Do we not need this anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

since we don't have the constness param on traits, we don't need <T as ~const> anymore

@compiler-errors
Copy link
Member

@bors rollup=never

@fee1-dead
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Contributor
bors commented Jul 9, 2024

📌 Commit 46af987 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 9, 2024
@bors
Copy link
Contributor
bors commented Jul 9, 2024

⌛ Testing commit 46af987 with merge 5be2ec7...

@bors
Copy link
Contributor
bors commented Jul 9, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 5be2ec7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 9, 2024
@bors bors merged commit 5be2ec7 into rust-lang:master Jul 9, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 9, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5be2ec7): 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)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -4.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)
-4.3% [-4.3%, -4.3%] 2
All ❌✅ (primary) - - 0

Cycles

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

Binary size

Results (secondary 0.0%)

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

Bootstrap: 703.367s -> 702.485s (-0.13%)
Artifact size: 328.80 MiB -> 328.89 MiB (0.03%)

@rustbot rustbot removed the perf-regression Performance regression. label Jul 9, 2024
@fee1-dead fee1-dead deleted the trait_def_const_trait branch July 10, 2024 06:41
@fee1-dead fee1-dead added the PG-const-traits Project group: Const traits label Aug 9, 2024
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. PG-const-traits Project group: Const traits 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