Skip to content

Add a size_hint function to Display - #161460

Draft
Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:fmt-display-size-hint
Draft

Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:fmt-display-size-hint

Conversation

@Kobzol

@Kobzol Kobzol commented Aug 21, 2026

Copy link
Copy Markdown
Member

Just an experiment for perf, nothing to see here.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 21, 2026
@Kobzol

Kobzol commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 21, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 21, 2026
Add a `size_hint` function to `Display`
@rust-bors

rust-bors Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

💔 Test for d9d1a1f failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Kobzol
Kobzol force-pushed the fmt-display-size-hint branch from 31fe47f to 76b24a5 Compare August 21, 2026 14:31
@Kobzol

Kobzol commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 21, 2026
Add a `size_hint` function to `Display`
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-gcc-core-tests failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

Important

For more information how to resolve CI failures of this job, visit this link.

@rust-bors

rust-bors Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: b2da04e (b2da04e16117d7344a6cefa658b39405b8fe036e)
Base parent: 526c36b (526c36b4c477994b7905ec6a084d6150e49076f5)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (b2da04e): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.4% [0.1%, 1.9%] 45
Regressions ❌
(secondary)
1.2% [0.1%, 8.3%] 29
Improvements ✅
(primary)
-0.3% [-3.2%, -0.1%] 24
Improvements ✅
(secondary)
-0.5% [-1.5%, -0.1%] 30
All ❌✅ (primary) 0.1% [-3.2%, 1.9%] 69

Max RSS (memory usage)

Results (primary 2.0%, secondary -5.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.0% [0.8%, 3.6%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.7% [-8.3%, -4.2%] 3
All ❌✅ (primary) 2.0% [0.8%, 3.6%] 6

Cycles

Results (primary -0.3%, secondary 4.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
5.0% [2.3%, 9.1%] 8
Improvements ✅
(primary)
-2.7% [-2.7%, -2.7%] 1
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) -0.3% [-2.7%, 2.1%] 2

Binary size

Results (primary 1.1%, secondary 1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.1% [0.1%, 5.0%] 125
Regressions ❌
(secondary)
1.0% [0.0%, 4.7%] 147
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [0.1%, 5.0%] 125

Bootstrap: 470.08s -> 466.848s (-0.69%)
Artifact size: 400.00 MiB -> 401.57 MiB (0.39%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants