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

Check divergence value first before doing span operations in warn_if_unreachable #128544

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

compiler-errors
Copy link
Member

It's more expensive to extract the span's desugaring first rather than check the value of the divergence enum. For some reason I inverted these checks, probably for readability, but as a consequence I regressed perf:

#128443 (comment)

r? fmease

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

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

Check divergence value first before doing span operations in `warn_if_unreachable`

It's more expensive to extract the span's desugaring first rather than check the value of the divergence enum. For some reason I inverted these checks, probably for readability, but as a consequence I regressed perf:

rust-lang#128443 (comment)

r? fmease
@bors
Copy link
Contributor

bors commented Aug 2, 2024

⌛ Trying commit f850e37 with merge 9643070...

Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

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

I did wonder if the Always<->is_desugaring swap of ordering in the original PR had any perf implications ^^' Let's see :)

r=me if perf gud

@bors
Copy link
Contributor

bors commented Aug 2, 2024

☀️ Try build successful - checks-actions
Build commit: 9643070 (9643070d2fd619f53c596be3a25561a82d48c68a)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9643070): 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.4% [-0.8%, -0.2%] 22
Improvements ✅
(secondary)
-1.0% [-2.1%, -0.2%] 33
All ❌✅ (primary) -0.4% [-0.8%, -0.2%] 22

Max RSS (memory usage)

Results (primary 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)
1.4% [1.4%, 1.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [1.4%, 1.4%] 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: 759.288s -> 757.623s (-0.22%)
Artifact size: 336.86 MiB -> 336.64 MiB (-0.07%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 3, 2024
@compiler-errors
Copy link
Member Author

@bors r=fmease

@bors
Copy link
Contributor

bors commented Aug 3, 2024

📌 Commit f850e37 has been approved by fmease

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 3, 2024
@bors
Copy link
Contributor

bors commented Aug 4, 2024

⌛ Testing commit f850e37 with merge ab1527f...

@bors
Copy link
Contributor

bors commented Aug 4, 2024

☀️ Test successful - checks-actions
Approved by: fmease
Pushing ab1527f to master...

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

Finished benchmarking commit (ab1527f): 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.3% [-0.5%, -0.2%] 21
Improvements ✅
(secondary)
-1.0% [-2.1%, -0.2%] 34
All ❌✅ (primary) -0.3% [-0.5%, -0.2%] 21

Max RSS (memory usage)

Results (primary 0.8%, secondary -1.8%)

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.8%, 0.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) 0.8% [0.8%, 0.8%] 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: 757.752s -> 757.91s (0.02%)
Artifact size: 336.82 MiB -> 336.82 MiB (0.00%)

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