Skip to content

Rollup of 5 perf-sensitive pull requests - #164931

Merged
rust-bors[bot] merged 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-evgAZRd
Oct 25, 2026
Merged

rust-bors[bot] merged 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-evgAZRd

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

joshtriplett and others added 14 commits October 5, 2026 14:46
This avoids needing the overhead of a call before discovering that the
`Cow` is already owned.
These show up in hot paths, and inlining should allow optimizing them.
These are simple wrappers but nonetheless don't get inlined and show up
in hot paths.
These are simple wrappers.
…ree-sync, r=GuillaumeGomez"

This reverts commit 36096d0, reversing
changes made to c1ed5e8.
…Simulacrum

Add various `#[inline]` annotations for simple functions on hot paths that don't get inlined

All of these are simple, likely to be optimizable once inlined into their caller, and found on hot paths in profiles (I used `clap_derive` for the profiling) as non-inlined functions.
…=hanna-kruppe

Don't emit allow attributes in try/contract desugaring
…rouwer,nnethercote

create fast path for attributes created in builtin macro expansions

Emitting attributes in rustc_builtin_macros involves creating an `ast::Attribute` and token trees, just to parse that into a parsed attribute almost immediately. This PR sidesteps that by creating a new `ast::Attribute` variant that does not do this. I've taken care to only do this for the derive and test macros, so that they never re-enter the parser.

This results in some moderate performance gains. It'll also take away almost all of the regressions in rust-lang#164217 (comment) (see rust-lang#164281 (comment) for a perf run of this and that PR stacked)

r? @nnethercote
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 25, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 90dd286 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Oct 25, 2026
@rust-bors

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer changed the title Rollup of 5 pull requests Rollup of 5 perf-sensitive pull requests Oct 25, 2026
@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 25, 2026
@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 3m 48s
Pushing 76456a6 to main...

@rust-bors
rust-bors Bot merged commit 76456a6 into rust-lang:main Oct 25, 2026
15 checks passed
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 7d0f9b4 (parent) -> 76456a6 (this PR)

Test differences

Show 54 test diffs

54 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 76456a688bc0ed897fa23a677d4ddb5b3fdb575a --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. test-x86_64-msvc-ext2: 1h 3m -> 1h 49m (+71.4%)
  2. test-i686-gnu-2: 1h 3m -> 1h 49m (+71.0%)
  3. test-x86_64-msvc-ext3: 1h 8m -> 1h 53m (+65.8%)
  4. test-i686-gnu-nopt-2: 1h 28m -> 2h 25m (+65.1%)
  5. test-x86_64-mingw-2: 1h 43m -> 2h 48m (+62.1%)
  6. test-x86_64-rust-for-linux: 34m 46s -> 53m 36s (+54.2%)
  7. dist-loongarch64-musl: 1h 19m -> 2h 2m (+54.0%)
  8. test-i686-msvc: 1h 34m -> 2h 20m (+48.7%)
  9. test-i686-gnu-1: 1h 29m -> 2h 13m (+48.5%)
  10. dist-armv7-linux: 1h 5m -> 1h 36m (+47.3%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#163845 Add various #[inline] annotations for simple functions on… 06a58da5923c185c34e3853fd55231eedb906798
(link)
#164122 Don't emit allow attributes in try/contract desugaring eeff8b41823572a7bea6e97cd298f99f40dc6aa3
(link)
#164260 create fast path for attributes created in builtin macro ex… 5d7c38d55377bccc1b2e7c738a36506dd19c1fef
(link)
#164300 Deduplicate DefId encodings in the query cache 69cf1614881cbb8da5bb9f31876f2f52c6cb2d76
(link)
#164929 Revert "rustc_codegen_gcc subtree update" 359bf16b79413f5e9b0791853524659cc651df5e
(link)

parent commit: 7d0f9b4ec5

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (76456a6): comparison URL.

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

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

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

mean range count
Regressions ❌
(primary)
0.7% [0.1%, 2.5%] 88
Regressions ❌
(secondary)
0.7% [0.1%, 2.2%] 64
Improvements ✅
(primary)
-0.8% [-12.7%, -0.1%] 110
Improvements ✅
(secondary)
-1.0% [-3.4%, -0.1%] 36
All ❌✅ (primary) -0.2% [-12.7%, 2.5%] 198

Max RSS (memory usage)

Results (primary -1.3%, secondary -1.6%)

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

mean range count
Regressions ❌
(primary)
1.3% [0.6%, 2.6%] 5
Regressions ❌
(secondary)
2.4% [0.6%, 5.0%] 4
Improvements ✅
(primary)
-1.6% [-3.6%, -0.4%] 56
Improvements ✅
(secondary)
-2.8% [-5.4%, -0.6%] 13
All ❌✅ (primary) -1.3% [-3.6%, 2.6%] 61

Cycles

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

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

mean range count
Regressions ❌
(primary)
1.4% [0.8%, 2.9%] 4
Regressions ❌
(secondary)
2.5% [0.5%, 5.2%] 10
Improvements ✅
(primary)
-2.8% [-13.1%, -0.5%] 22
Improvements ✅
(secondary)
-3.2% [-6.0%, -0.6%] 10
All ❌✅ (primary) -2.1% [-13.1%, 2.9%] 26

Binary size

Results (primary -1.2%, secondary -0.6%)

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

mean range count
Regressions ❌
(primary)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-2.7%, -0.1%] 37
Improvements ✅
(secondary)
-0.6% [-1.1%, -0.1%] 9
All ❌✅ (primary) -1.2% [-2.7%, 2.5%] 38

Bootstrap: 490.188s -> 489.982s (-0.04%)
Artifact size: 405.91 MiB -> 405.87 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Oct 26, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@rust-timer triage all

@rust-timer

rust-timer commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator
Running triage with 42 benchmarks

Triage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
For this rollup, these benchmarks are:

  • await-call-tree
  • bitmaps-3.2.1
  • cargo-0.87.1
  • clap_derive-4.5.32
  • clap_derive-4.5.32-nll
  • coercions
  • cranelift-codegen-0.119.0
  • ctfe-stress-5
  • deeply-nested-multi
  • derive
  • diesel-2.2.10
  • diesel-2.2.10-new-solver
  • enum-stress
  • externs
  • eza-0.21.2
  • html5ever-0.31.0
  • hyper-1.6.0
  • image-0.25.6
  • issue-58319
  • issue-88862
  • libc-0.2.172
  • many-assoc-items
  • nalgebra-0.33.0
  • regex-automata-0.4.8
  • regression-31157
  • ripgrep-14.1.1
  • ripgrep-14.1.1-nll
  • ripgrep-14.1.1-tiny
  • serde-1.0.219
  • serde-1.0.219-nll
  • serde_derive-1.0.219
  • stm32f4-0.15.1
  • syn-2.0.101
  • syn-2.0.101-new-solver
  • tokio-1.53.1
  • tt-muncher
  • tuple-stress
  • typenum-1.18.0
  • ucd
  • unicode-normalization-0.1.24
  • wf-projection-stress-65510
  • wg-grammar

#163845 06a58da Add various #[inline] annotations for simple functions on hot paths that don't get inlined

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.8% [0.4%, 2.0%] 5
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 4
Improvements ✅
(primary)
-2.1% [-12.8%, -0.2%] 19
Improvements ✅
(secondary)
-1.4% [-3.4%, -0.3%] 3
All ❌✅ (primary) -1.5% [-12.8%, 2.0%] 24

Max RSS (memory usage)

Results (primary 0.3%, 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.8% [0.4%, 1.5%] 16
Regressions ❌
(secondary)
0.7% [0.6%, 0.9%] 3
Improvements ✅
(primary)
-1.6% [-3.3%, -0.9%] 4
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) 0.3% [-3.3%, 1.5%] 20

Cycles

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

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

mean range count
Regressions ❌
(primary)
1.2% [0.6%, 2.9%] 4
Regressions ❌
(secondary)
1.3% [0.7%, 2.2%] 3
Improvements ✅
(primary)
-3.2% [-13.5%, -0.4%] 13
Improvements ✅
(secondary)
-1.6% [-3.3%, -0.5%] 5
All ❌✅ (primary) -2.1% [-13.5%, 2.9%] 17

Binary size

Results (primary -1.2%, secondary -0.6%)

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

mean range count
Regressions ❌
(primary)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-2.7%, -0.1%] 38
Improvements ✅
(secondary)
-0.6% [-1.1%, -0.1%] 9
All ❌✅ (primary) -1.2% [-2.7%, 2.5%] 39

#164122 eeff8b4 Don't emit allow attributes in try/contract desugaring

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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-0.7% [-1.9%, -0.1%] 103
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.1%] 23
All ❌✅ (primary) -0.7% [-1.9%, -0.1%] 103

Max RSS (memory usage)

Results (primary 0.1%, secondary 0.4%)

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

mean range count
Regressions ❌
(primary)
1.0% [0.5%, 1.7%] 13
Regressions ❌
(secondary)
0.7% [0.5%, 1.2%] 7
Improvements ✅
(primary)
-1.1% [-3.3%, -0.5%] 10
Improvements ✅
(secondary)
-1.4% [-1.4%, -1.4%] 1
All ❌✅ (primary) 0.1% [-3.3%, 1.7%] 23

Cycles

Results (primary -0.9%, secondary 1.4%)

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

mean range count
Regressions ❌
(primary)
0.8% [0.4%, 1.1%] 4
Regressions ❌
(secondary)
2.2% [0.6%, 5.1%] 5
Improvements ✅
(primary)
-1.2% [-3.2%, -0.4%] 20
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.4%] 2
All ❌✅ (primary) -0.9% [-3.2%, 1.1%] 24

Binary size

This perf run didn't have relevant results for this metric.


#164260 5d7c38d create fast path for attributes created in builtin macro expansions

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)
-0.4% [-1.3%, -0.1%] 76
Improvements ✅
(secondary)
-1.3% [-3.9%, -0.2%] 26
All ❌✅ (primary) -0.4% [-1.3%, -0.1%] 76

Max RSS (memory usage)

Results (primary 0.4%, secondary 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.9% [0.4%, 2.0%] 12
Regressions ❌
(secondary)
1.3% [0.5%, 4.2%] 8
Improvements ✅
(primary)
-1.3% [-2.9%, -0.5%] 4
Improvements ✅
(secondary)
-0.7% [-0.7%, -0.7%] 1
All ❌✅ (primary) 0.4% [-2.9%, 2.0%] 16

Cycles

Results (primary -0.6%, secondary -1.9%)

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

mean range count
Regressions ❌
(primary)
0.5% [0.4%, 0.5%] 5
Regressions ❌
(secondary)
1.2% [0.5%, 2.7%] 4
Improvements ✅
(primary)
-1.0% [-2.1%, -0.4%] 17
Improvements ✅
(secondary)
-3.6% [-6.8%, -0.5%] 7
All ❌✅ (primary) -0.6% [-2.1%, 0.5%] 22

Binary size

This perf run didn't have relevant results for this metric.


#164300 69cf161 Deduplicate DefId encodings in the query cache

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.8% [0.1%, 1.6%] 149
Regressions ❌
(secondary)
0.7% [0.1%, 2.2%] 81
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.1%, 1.6%] 149

Max RSS (memory usage)

Results (primary -1.1%, 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.9% [0.4%, 1.8%] 10
Regressions ❌
(secondary)
0.8% [0.4%, 1.6%] 4
Improvements ✅
(primary)
-1.7% [-6.5%, -0.5%] 37
Improvements ✅
(secondary)
-3.4% [-5.2%, -0.9%] 10
All ❌✅ (primary) -1.1% [-6.5%, 1.8%] 47

Cycles

Results (primary 0.0%, secondary 0.8%)

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

mean range count
Regressions ❌
(primary)
0.8% [0.5%, 1.2%] 8
Regressions ❌
(secondary)
1.5% [1.0%, 2.4%] 4
Improvements ✅
(primary)
-0.9% [-2.2%, -0.4%] 7
Improvements ✅
(secondary)
-0.6% [-0.7%, -0.5%] 2
All ❌✅ (primary) 0.0% [-2.2%, 1.2%] 15

Binary size

This perf run didn't have relevant results for this metric.


#164929 359bf16 Revert "rustc_codegen_gcc subtree update"

Queued 359bf16 with parent 7d0f9b4, future comparison URL.
There are currently 15 preceding artifacts in the queue.
It will probably take at least ~5.9 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

A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

6 participants