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

Don't normalize constants unless they need normalization #104063

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

compiler-errors
Copy link
Member

Maybe makes normalization a bit faster when we have many constants in a type

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 Nov 6, 2022
@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 Nov 6, 2022
@bors
Copy link
Collaborator

bors commented Nov 6, 2022

⌛ Trying commit f28b34f782113e141da4e3844b33befa06440504 with merge 3d331029b8b114cffdc374f6166ca072a914f4e8...

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Nov 6, 2022

⌛ Trying commit 610bf813fb17a89da527cdc10692d895085a91b9 with merge 9b532b8b2703dc9b67dfb7bfb6626075cca0a4cf...

@rust-log-analyzer

This comment was marked as outdated.

@bors
Copy link
Collaborator

bors commented Nov 6, 2022

☀️ Try build successful - checks-actions
Build commit: 9b532b8b2703dc9b67dfb7bfb6626075cca0a4cf (9b532b8b2703dc9b67dfb7bfb6626075cca0a4cf)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9b532b8b2703dc9b67dfb7bfb6626075cca0a4cf): 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-review -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.3% [-1.4%, -1.2%] 2
Improvements ✅
(secondary)
-3.1% [-4.0%, -0.4%] 7
All ❌✅ (primary) -1.3% [-1.4%, -1.2%] 2

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.2% [0.6%, 3.8%] 2
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-0.9% [-1.2%, -0.6%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [-1.2%, 3.8%] 4

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 6, 2022
@compiler-errors compiler-errors marked this pull request as ready for review November 6, 2022 21:20
@compiler-errors
Copy link
Member Author

r? types

@@ -650,6 +650,10 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
if tcx.lazy_normalization() {
constant
} else {
if !needs_normalization(&constant, self.param_env.reveal()) {
Copy link
Member

Choose a reason for hiding this comment

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

This could be merged into the above condition

Copy link
Member Author

Choose a reason for hiding this comment

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

of course

@jackh726
Copy link
Member

jackh726 commented Nov 6, 2022

r=me after nit

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9b532b8b2703dc9b67dfb7bfb6626075cca0a4cf): 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-review -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.3% [-1.4%, -1.2%] 2
Improvements ✅
(secondary)
-3.1% [-4.0%, -0.4%] 7
All ❌✅ (primary) -1.3% [-1.4%, -1.2%] 2

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.2% [0.6%, 3.8%] 2
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-0.9% [-1.2%, -0.6%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [-1.2%, 3.8%] 4

Cycles

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

@compiler-errors
Copy link
Member Author

@bors r=jackh726

@bors
Copy link
Collaborator

bors commented Nov 7, 2022

📌 Commit 152646f has been approved by jackh726

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 Nov 7, 2022
@bors
Copy link
Collaborator

bors commented Nov 8, 2022

⌛ Testing commit 152646f with merge ddfe1e8...

@bors
Copy link
Collaborator

bors commented Nov 8, 2022

☀️ Test successful - checks-actions
Approved by: jackh726
Pushing ddfe1e8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 8, 2022
@bors bors merged commit ddfe1e8 into rust-lang:master Nov 8, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 8, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ddfe1e8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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

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)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
13.2% [11.4%, 16.7%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [1.0%, 1.0%] 1

@compiler-errors compiler-errors deleted the ct-norm-unless branch August 11, 2023 19:58
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.

6 participants