Skip to content

Rollup of 4 perf-sensitive pull requests - #162859

Merged
rust-bors[bot] merged 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-0CDWDbo
Sep 17, 2026
Merged

rust-bors[bot] merged 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-0CDWDbo

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Sep 16, 2026

Copy link
Copy Markdown
Member

View all comments

Successful merges:

r? @ghost

Create a similar rollup

GuillaumeGomez and others added 10 commits September 15, 2026 23:31
Because it is derived from `PerOwnerLoweringState::owner`.
They are constants but they don't look like it because they are stored
in fields. This commit makes them statics. `allow_gen_future` becomes a
method because its value depends on `async_fn_track_caller`.
Cache block seeking results for initialized_at_terminator and _exit

Caching the block values post-seek results in significant performance wins (especially on pathological benchmarks). These wins extend to NLL, too.

Possibly, this caching could be done further up the stack (more generically), but figured this is a "safer" approach - rather than dealing with other potential fallout.

r? lqd
…ient-crates, r=petrochenkov

[rustc_resolve]  Correctly keep all reexports in `ModChild::reexport_chain`

Fixes rust-lang#81893.

First commit comes from rust-lang#161872 and it's the base I used for the fix in the second commit (which also reverts basically everything from the first commit, not sure if I should keep it...). In short, `NameResolution` only seems to have access to local reexports and to the final reexported item. So instead, we keep the information in `DeclKind` (which cannot implement `Drop` because it's part of `DeclData` which is stored in `ResolverArenas::dropless` so I kept a slice instead of a `SmallVec`. Guess how I found out? Lots of `panic`s :') ) and we use this information in `reexport_chain`.

r? @petrochenkov
…ker-first-context, r=petrochenkov

perf: Keep the first macro syntax-context mapping inline
…pastorino

Lowering cleanups

Details in the individual commits.

r? @spastorino
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 16, 2026
@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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Sep 16, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-gnu-llvm-21-3,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu

@rust-bors

rust-bors Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 2792a2e 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 Sep 16, 2026
@JonathanBrouwer JonathanBrouwer changed the title Rollup of 4 pull requests Rollup of 4 perf-sensitive pull requests Sep 16, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 16, 2026
Rollup of 4 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-gnu-llvm-21-3
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 16, 2026
…uwer

Rollup of 4 perf-sensitive pull requests

Successful merges:

 - #162450 (Cache block seeking results for initialized_at_terminator and _exit)
 - #162543 ([rustc_resolve]  Correctly keep all reexports in `ModChild::reexport_chain`)
 - #162712 (perf: Keep the first macro syntax-context mapping inline)
 - #162747 (Lowering cleanups)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-armhf-gnu failed! Check out the build log: (web) (plain enhanced) (plain)

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

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 16, 2026
@rust-bors

rust-bors Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

💔 Test for bb1f487 failed: CI. Failed job:

@rust-bors

rust-bors Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 31adc06 (31adc06b1607eebdc770b9b14b462e6efe47f5c5)
Base parent: 92801ed (92801ede88f6c10e34df6976a4cfde40142585f2)

@jhpratt

jhpratt commented Sep 16, 2026

Copy link
Copy Markdown
Member

thread 'main' (201955) panicked at src/tools/remote-test-client/src/main.rs:374:5:
io::copy(&mut file, dst) failed with Connection reset by peer (os error 104)

@bors retry

@bors try jobs=test-armhf-gnu

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 17, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
…uwer

Rollup of 4 perf-sensitive pull requests

Successful merges:

 - #162450 (Cache block seeking results for initialized_at_terminator and _exit)
 - #162543 ([rustc_resolve]  Correctly keep all reexports in `ModChild::reexport_chain`)
 - #162712 (perf: Keep the first macro syntax-context mapping inline)
 - #162747 (Lowering cleanups)
@Zalathar

Copy link
Copy Markdown
Member

Let's also do a try job in parallel to get a second opinion.

@bors try jobs=test-aarch64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
Rollup of 4 perf-sensitive pull requests


try-job: test-aarch64-msvc-1
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 17, 2026
@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

💔 Test for eec2d1e failed: CI. Failed job:

@Zalathar

Copy link
Copy Markdown
Member

Couldn’t get logs, so the failure is probably bogus.

@bors retry

@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 Sep 17, 2026
@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 06e9b2d (06e9b2d604801311d3420b46b1ae056e9d9aae63)
Base parent: 923c95c (923c95cdf5ba65cea505aa2ea829f578e1506ed8)

@rust-bors

This comment has been minimized.

@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 Sep 17, 2026
@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 7m 1s
Pushing c999cef to main...

@rust-bors
rust-bors Bot merged commit c999cef into rust-lang:main Sep 17, 2026
15 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 17, 2026
@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 923c95c (parent) -> c999cef (this PR)

Test differences

Show 7 test diffs

Stage 1

  • [rustdoc-html] tests/rustdoc-html/reexport/transient-reexports.rs: [missing] -> pass (J0)

Stage 2

  • [rustdoc-html] tests/rustdoc-html/reexport/transient-reexports.rs: [missing] -> pass (J1)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard c999cef531ea9059e189e82fe0e82c5daf249bc9 --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-i686-msvc: 1h 41m -> 2h 37m (+54.4%)
  2. test-various: 1h 28m -> 2h 12m (+50.5%)
  3. test-x86_64-msvc-ext3: 1h 23m -> 2h 2m (+45.6%)
  4. test-pr-check-2: 27m 34s -> 38m 28s (+39.5%)
  5. test-x86_64-gnu-llvm-21-3: 1h 52m -> 1h 10m (-37.2%)
  6. dist-ohos-armv7: 58m 15s -> 1h 16m (+32.0%)
  7. dist-riscv64-linux-gnu: 1h 36m -> 1h 7m (-29.9%)
  8. test-x86_64-gnu: 2h 35m -> 1h 49m (-29.3%)
  9. dist-i586-gnu-i586-i686-musl: 20m 22s -> 26m 12s (+28.6%)
  10. test-aarch64-apple-macos-26-2: 2h 37m -> 1h 53m (-28.2%)
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-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (c999cef): 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.4% [0.2%, 0.5%] 4
Regressions ❌
(secondary)
0.3% [0.1%, 0.7%] 10
Improvements ✅
(primary)
-0.8% [-5.9%, -0.1%] 123
Improvements ✅
(secondary)
-0.7% [-5.5%, -0.1%] 71
All ❌✅ (primary) -0.7% [-5.9%, 0.5%] 127

Max RSS (memory usage)

Results (primary 2.3%, 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)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
3.5% [1.1%, 5.9%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-5.8%, -1.4%] 3
All ❌✅ (primary) 2.3% [2.3%, 2.3%] 1

Cycles

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

Binary size

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

Bootstrap: 497.899s -> 500.132s (0.45%)
Artifact size: 406.75 MiB -> 406.81 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Sep 17, 2026
@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#162450 Cache block seeking results for initialized_at_terminator a… 89b00936ef55a626bd75ee72f99c8e9b00706742
(link)
#162543 [rustc_resolve] Correctly keep all reexports in `ModChild:… a289e4f2d3988ee608d21a0b0b11f4ab62c2c743
(link)
#162712 perf: Keep the first macro syntax-context mapping inline 4395c62bef89d6fa2947faa559c6f0300e484c76
(link)
#162747 Lowering cleanups 4da6ef728e49cf15904e12b742dbbc0b699821d9
(link)

parent commit: 923c95cdf5

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 $SHA1 $SHA2 $SHA3..., or run @rust-timer triage all to benchmark all rollup members.

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@rust-timer triage all

@rust-timer

rust-timer commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator
Running triage with 31 benchmarks

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

  • bitmaps-3.2.1
  • cargo-0.87.1
  • clap_derive-4.5.32
  • clap_derive-4.5.32-nll
  • coercions
  • deep-vector
  • derive
  • diesel-2.2.10
  • externs
  • helloworld
  • hyper-1.6.0
  • issue-88862
  • libc-0.2.172
  • many-assoc-items
  • match-stress
  • nalgebra-0.33.0
  • regex-automata-0.4.8
  • ripgrep-14.1.1
  • ripgrep-14.1.1-nll
  • serde-1.0.219
  • serde-1.0.219-new-solver
  • 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
  • typenum-1.18.0
  • unicode-normalization-0.1.24
  • unused-warnings

#162450 89b0093 Cache block seeking results for initialized_at_terminator and _exit

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)
-4.5% [-5.8%, -3.6%] 12
Improvements ✅
(secondary)
-4.6% [-5.3%, -4.0%] 3
All ❌✅ (primary) -4.5% [-5.8%, -3.6%] 12

Max RSS (memory usage)

Results (primary -3.1%, secondary 3.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.2% [2.3%, 4.0%] 2
Improvements ✅
(primary)
-3.1% [-4.2%, -2.3%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.1% [-4.2%, -2.3%] 3

Cycles

Results (primary 0.5%)

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

mean range count
Regressions ❌
(primary)
2.0% [1.7%, 2.4%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [-2.5%, 2.4%] 3

Binary size

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


#162543 a289e4f [rustc_resolve] Correctly keep all reexports in ModChild::reexport_chain

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.2%, 0.8%] 11
Regressions ❌
(secondary)
0.4% [0.3%, 0.7%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-0.8%, -0.8%] 3
All ❌✅ (primary) 0.4% [0.2%, 0.8%] 11

Max RSS (memory usage)

Results (primary -0.2%, 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)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
3.4% [1.0%, 5.2%] 3
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-4.7% [-5.5%, -4.1%] 5
All ❌✅ (primary) -0.2% [-2.4%, 2.0%] 2

Cycles

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

Binary size

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


#162712 4395c62 perf: Keep the first macro syntax-context mapping inline

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.2%] 5
Improvements ✅
(primary)
-0.4% [-0.9%, -0.2%] 38
Improvements ✅
(secondary)
-0.5% [-0.9%, -0.2%] 17
All ❌✅ (primary) -0.4% [-0.9%, -0.2%] 38

Max RSS (memory usage)

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

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

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
2.7% [1.1%, 4.7%] 3
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 2
Improvements ✅
(secondary)
-4.4% [-4.6%, -4.1%] 4
All ❌✅ (primary) -1.2% [-2.3%, 1.0%] 3

Cycles

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

Binary size

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


#162747 4da6ef7 Lowering cleanups

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.2% [0.1%, 0.2%] 3
Improvements ✅
(primary)
-0.3% [-0.5%, -0.1%] 67
Improvements ✅
(secondary)
-0.6% [-1.5%, -0.2%] 46
All ❌✅ (primary) -0.3% [-0.5%, -0.1%] 67

Max RSS (memory usage)

Results (primary -2.6%, secondary -2.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)
3.4% [2.3%, 4.5%] 2
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
-4.7% [-5.1%, -4.1%] 4
All ❌✅ (primary) -2.6% [-2.6%, -2.6%] 1

Cycles

Results (secondary -2.6%)

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

Binary size

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

@lqd

lqd commented Sep 17, 2026

Copy link
Copy Markdown
Member

#162543 (comment) should be the source of the regression

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

I'm aware, the goal of the triage run is to verify that the actual performance effect of the member PRs of this rollup matches the expected one from earlier perf runs

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. rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.