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

Switch inline(always) in core/src/fmt/rt.rs to plain inline #134047

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Dec 8, 2024

I have a vague memory of these being instantiated a lot. Let's ask perf.

Looks like this is an improvement!

@saethlin saethlin added the S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. label Dec 8, 2024
@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 Dec 8, 2024
@saethlin
Copy link
Member Author

saethlin commented Dec 8, 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 Dec 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 8, 2024
Switch inline(always) in core/src/fmt/rt.rs to plain inline

I have a vague memory of these being instantiated a lot. Let's ask perf.

r? ghost
@bors
Copy link
Contributor

bors commented Dec 8, 2024

⌛ Trying commit 5f68526 with merge 0712b2a...

@bors
Copy link
Contributor

bors commented Dec 8, 2024

☀️ Try build successful - checks-actions
Build commit: 0712b2a (0712b2a356e9c042128d555d7c856df1d6365c20)

@rust-timer

This comment has been minimized.

@saethlin saethlin removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 9, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0712b2a): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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 the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.5%] 3
Improvements ✅
(primary)
-0.4% [-0.9%, -0.1%] 12
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) -0.4% [-0.9%, -0.1%] 12

Max RSS (memory usage)

Results (primary -2.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)
2.0% [1.2%, 2.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.6% [-5.3%, -2.3%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.0% [-5.3%, 2.7%] 7

Cycles

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

Binary size

Results (primary -0.4%, 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.2% [0.0%, 0.6%] 17
Regressions ❌
(secondary)
0.3% [0.1%, 0.4%] 6
Improvements ✅
(primary)
-0.6% [-5.0%, -0.1%] 44
Improvements ✅
(secondary)
-0.2% [-0.5%, -0.1%] 7
All ❌✅ (primary) -0.4% [-5.0%, 0.6%] 61

Bootstrap: 767.853s -> 766.73s (-0.15%)
Artifact size: 330.92 MiB -> 330.87 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 Dec 9, 2024
@saethlin
Copy link
Member Author

saethlin commented Dec 9, 2024

Neat.

@saethlin saethlin added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. labels Dec 9, 2024
@saethlin saethlin marked this pull request as ready for review December 9, 2024 03:58
@saethlin
Copy link
Member Author

saethlin commented Dec 9, 2024

r? libs

@tgross35
Copy link
Contributor

It looks like these were added as part of #110766 (@m-ou-se), any chance this improves compile times but trades it for runtime formatting performance?

@m-ou-se
Copy link
Member

m-ou-se commented Dec 11, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Dec 11, 2024

📌 Commit 5f68526 has been approved by m-ou-se

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 Dec 11, 2024
@m-ou-se
Copy link
Member

m-ou-se commented Dec 11, 2024

I'm pretty sure the "always" part was just based on a gut feeling, not on actual measurements. We can always add some of them back if it turns out to make a difference.

@bors
Copy link
Contributor

bors commented Dec 13, 2024

⌛ Testing commit 5f68526 with merge 4847d6a...

@bors
Copy link
Contributor

bors commented Dec 13, 2024

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing 4847d6a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 13, 2024
@bors bors merged commit 4847d6a into rust-lang:master Dec 13, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 13, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4847d6a): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
-0.4% [-0.5%, -0.3%] 6
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-0.5%, -0.3%] 6

Max RSS (memory usage)

Results (primary -1.7%, secondary -2.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)
3.6% [1.9%, 5.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.8% [-5.7%, -1.5%] 5
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) -1.7% [-5.7%, 5.3%] 7

Cycles

Results (primary -2.1%, secondary -2.9%)

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

Binary size

Results (primary -0.1%, secondary 0.1%)

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.2% [0.0%, 0.4%] 19
Regressions ❌
(secondary)
0.3% [0.1%, 0.4%] 6
Improvements ✅
(primary)
-0.3% [-1.0%, -0.0%] 40
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 7
All ❌✅ (primary) -0.1% [-1.0%, 0.4%] 59

Bootstrap: 770.497s -> 770.238s (-0.03%)
Artifact size: 330.36 MiB -> 330.40 MiB (0.01%)

@saethlin saethlin deleted the inline-fmt-rt branch December 13, 2024 18:10
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. 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