Skip to content

mbe: Inline functions in transcribe that are only called once #142815

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jun 21, 2025

rust-lang/rust#142713 did some refactoring of macro expansion, which seems to have had an effect on performance. The only change was to split large functions into smaller ones, so mark some functions that are only called once #[inline] to make codegen more similar.

[142713] did some refactoring of macro expansion, which seems to have
had an effect on performance. The only change was to split large
functions into smaller ones, so mark some functions that are only called
once `#[inline]` to make codegen more similar.

[142713]: https://www.github.com/rust-lang/rust/pull/142713
@rustbot
Copy link
Collaborator

rustbot commented Jun 21, 2025

r? @compiler-errors

rustbot has assigned @compiler-errors.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 21, 2025
@tgross35 tgross35 marked this pull request as draft June 21, 2025 05:30
@tgross35
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 21, 2025

⌛ Trying commit 3a76b79 with merge ae84552

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 21, 2025
mbe: Inline functions in `transcribe` that are only called once

[#142713] did some refactoring of macro expansion, which seems to have had an effect on performance. The only change was to split large functions into smaller ones, so mark some functions that are only called once `#[inline]` to make codegen more similar.

[#142713]: https://www.github.com/rust-lang/rust/pull/142713
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 21, 2025
@tgross35 tgross35 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 21, 2025

☀️ Try build successful (CI)
Build commit: ae84552 (ae84552d1d14f25aade420c5a16f0a13fd2b8307, parent: 15c701fbc995eb6c5b3a86021c18185f8eee020d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ae84552): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.9% [-2.9%, -2.9%] 1

Max RSS (memory usage)

Results (primary 7.2%)

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

mean range count
Regressions ❌
(primary)
7.2% [7.2%, 7.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 7.2% [7.2%, 7.2%] 1

Cycles

Results (primary -2.8%, secondary -2.2%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.8% [-2.8%, -2.8%] 1
Improvements ✅
(secondary)
-2.2% [-2.3%, -2.1%] 3
All ❌✅ (primary) -2.8% [-2.8%, -2.8%] 1

Binary size

Results (primary -1.1%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Bootstrap: 690.617s -> 691.665s (0.15%)
Artifact size: 371.83 MiB -> 371.86 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 21, 2025
@tgross35
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

⌛ Trying commit b9878b2 with merge 5a371e6

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 24, 2025
mbe: Inline functions in `transcribe` that are only called once

[#142713] did some refactoring of macro expansion, which seems to have had an effect on performance. The only change was to split large functions into smaller ones, so mark some functions that are only called once `#[inline]` to make codegen more similar.

[#142713]: https://www.github.com/rust-lang/rust/pull/142713
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 24, 2025
@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor Author

@bors2 try cancel

@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

Try build cancelled. Cancelled workflows:

@tgross35
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jun 24, 2025
mbe: Inline functions in `transcribe` that are only called once

[#142713] did some refactoring of macro expansion, which seems to have had an effect on performance. The only change was to split large functions into smaller ones, so mark some functions that are only called once `#[inline]` to make codegen more similar.

[#142713]: https://www.github.com/rust-lang/rust/pull/142713
@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

⌛ Trying commit 0bd2f7a with merge 725536d

To cancel the try build, run the command @bors2 try cancel.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 24, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

☀️ Try build successful (CI)
Build commit: 725536d (725536d6534c0b0c5b2f5953357703bdf826ecbd, parent: 36b21637e93b038453924d3c66821089e71d8baa)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (725536d): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@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.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 1

Max RSS (memory usage)

Results (primary -3.3%, secondary 1.7%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.7% [4.7%, 4.7%] 1
Improvements ✅
(primary)
-3.3% [-3.3%, -3.3%] 1
Improvements ✅
(secondary)
-1.2% [-1.2%, -1.2%] 1
All ❌✅ (primary) -3.3% [-3.3%, -3.3%] 1

Cycles

Results (primary -1.2%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.2% [-1.8%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.2% [-1.8%, -0.5%] 2

Binary size

Results (secondary -0.0%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

Bootstrap: 689.383s -> 689.503s (0.02%)
Artifact size: 371.94 MiB -> 371.93 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 24, 2025
@tgross35
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

⌛ Trying commit 8bfd405 with merge 155626a

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 24, 2025
mbe: Inline functions in `transcribe` that are only called once

[#142713] did some refactoring of macro expansion, which seems to have had an effect on performance. The only change was to split large functions into smaller ones, so mark some functions that are only called once `#[inline]` to make codegen more similar.

[#142713]: https://www.github.com/rust-lang/rust/pull/142713
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 24, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 25, 2025

☀️ Try build successful (CI)
Build commit: 155626a (155626a7fa8a7535412f9116ea17328071eda438, parent: 28f1c807911c63f08d98e7b468cfcf15a441e34b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (155626a): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
-0.9% [-1.5%, -0.2%] 2
All ❌✅ (primary) -1.5% [-1.5%, -1.5%] 1

Max RSS (memory usage)

Results (primary -3.5%, secondary 0.2%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
-3.5% [-3.5%, -3.5%] 1
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) -3.5% [-3.5%, -3.5%] 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: 689.458s -> 689.738s (0.04%)
Artifact size: 372.01 MiB -> 372.01 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 25, 2025
@tgross35
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rust-bors
Copy link

rust-bors bot commented Jun 25, 2025

⌛ Trying commit 39bb3c7 with merge f506b04

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 25, 2025
mbe: Inline functions in `transcribe` that are only called once

[#142713] did some refactoring of macro expansion, which seems to have had an effect on performance. The only change was to split large functions into smaller ones, so mark some functions that are only called once `#[inline]` to make codegen more similar.

[#142713]: https://www.github.com/rust-lang/rust/pull/142713
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 25, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 25, 2025

☀️ Try build successful (CI)
Build commit: f506b04 (f506b042b2135b475f6c9659f0890ac85dde9f49, parent: a17780db7b8eebbf42a1cbe6bc9cc83013820ba5)

@rust-timer
Copy link
Collaborator

Queued f506b04 with parent a17780d, future comparison URL.
There are currently 6 preceding artifacts in the queue.
It will probably take at least ~9.6 hours until the benchmark run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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