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

Get rid of USIZE_MARKER in formatting infrastructure #123819

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

joboet
Copy link
Member

@joboet joboet commented Apr 11, 2024

An alternative to #123780.

The USIZE_MARKER function used to differentiate between placeholder and count arguments is never called anyway, so we can just replace the function-pointer-comparison hack with an enum and an unreachable_unchecked, hopefully without causing a regression.

CC @RalfJung

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 11, 2024
@joboet
Copy link
Member Author

joboet commented Apr 11, 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 Apr 11, 2024
@bors
Copy link
Contributor

bors commented Apr 11, 2024

⌛ Trying commit 21c5ff8 with merge 90063dc...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 11, 2024
Get rid of `USIZE_MARKER` in formatting infrastructure

An alternative to rust-lang#123780.

The `USIZE_MARKER` function used to differentiate between placeholder and count arguments is never called anyway, so we can just replace the function-pointer-comparison hack with an `enum` and an `unreachable_unchecked`, hopefully without causing a regression.

CC `@RalfJung`
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Apr 11, 2024

☀️ Try build successful - checks-actions
Build commit: 90063dc (90063dcdcca809560c3a21bf15363378d40ebb0d)

1 similar comment
@bors
Copy link
Contributor

bors commented Apr 11, 2024

☀️ Try build successful - checks-actions
Build commit: 90063dc (90063dcdcca809560c3a21bf15363378d40ebb0d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (90063dc): 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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-0.4% [-0.6%, -0.3%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.3% [-0.6%, 0.4%] 5

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)
4.8% [4.5%, 5.1%] 2
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 2
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) 1.3% [-2.3%, 5.1%] 4

Cycles

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

Binary size

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.1% [0.0%, 1.4%] 50
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 15
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 8
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 34
All ❌✅ (primary) 0.1% [-0.1%, 1.4%] 58

Bootstrap: 677.211s -> 675.448s (-0.26%)
Artifact size: 315.97 MiB -> 315.93 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 Apr 11, 2024
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 13, 2024

📌 Commit 0f52cd0 has been approved by Mark-Simulacrum

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 Apr 13, 2024
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. perf-regression-triaged The performance regression has been triaged. 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 13, 2024
@bors
Copy link
Contributor

bors commented Apr 14, 2024

⌛ Testing commit 0f52cd0 with merge 7ab5eb8...

@bors
Copy link
Contributor

bors commented Apr 14, 2024

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 7ab5eb8 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Apr 14, 2024

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 7ab5eb8 to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels Apr 14, 2024
@bors bors merged commit 7ab5eb8 into rust-lang:master Apr 14, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 14, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7ab5eb8): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.6% [0.4%, 0.9%] 2
Regressions ❌
(secondary)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
-0.4% [-0.6%, -0.3%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.6%, 0.9%] 7

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.7% [0.8%, 5.1%] 5
Regressions ❌
(secondary)
3.0% [1.0%, 4.5%] 9
Improvements ✅
(primary)
-5.1% [-6.2%, -3.7%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-6.2%, 5.1%] 8

Cycles

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

Binary size

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.1% [0.0%, 1.3%] 49
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 13
Improvements ✅
(primary)
-0.1% [-0.5%, -0.0%] 11
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 34
All ❌✅ (primary) 0.1% [-0.5%, 1.3%] 60

Bootstrap: 676.211s -> 677.553s (0.20%)
Artifact size: 316.06 MiB -> 315.98 MiB (-0.03%)

@Kobzol
Copy link
Contributor

Kobzol commented Apr 16, 2024

More improvements than regressions.

@rustbot label: +perf-regression-triaged

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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library 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