Skip to content

[perf] defer the unconditional output resolution - #160312

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Randl:checks-minor-perf
Aug 2, 2026
Merged

[perf] defer the unconditional output resolution #160312
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Randl:checks-minor-perf

Conversation

@Randl

@Randl Randl commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Saw a ~twofold speedup locally for https://github.com/rust-lang/rust/blob/main/tests/ui/try-trait/deep-try-chain-issue-153583.rs
Probably minor for general use cases, but seems free?

@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 Aug 1, 2026
@rustbot

rustbot commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

r? @petrochenkov

rustbot has assigned @petrochenkov.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 17 candidates

@Kobzol

Kobzol commented Aug 1, 2026

Copy link
Copy Markdown
Member

@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 Aug 1, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 1, 2026
[perf] defer the unconditional output resolution
@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 13954f7 (13954f77cd08a51e4639eabf7bf5b2e10b2bbcb3)
Base parent: c47bb2f (c47bb2f39658c00b109693df9611d7238bedf6fa)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (13954f7): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.6% [-1.5%, -0.2%] 13
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (primary -0.3%, 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.6% [0.4%, 0.7%] 3
Regressions ❌
(secondary)
0.9% [0.4%, 1.2%] 3
Improvements ✅
(primary)
-0.7% [-1.2%, -0.4%] 6
Improvements ✅
(secondary)
-0.7% [-1.7%, -0.4%] 7
All ❌✅ (primary) -0.3% [-1.2%, 0.7%] 9

Binary size

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

Bootstrap: 490.834s -> 491.917s (0.22%)
Artifact size: 390.52 MiB -> 390.51 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 1, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

Nice.
@bors r+

@rust-bors

rust-bors Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a4a0f29 has been approved by petrochenkov

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 Aug 2, 2026
@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 Aug 2, 2026
@rust-bors

rust-bors Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: petrochenkov
Duration: 3h 12m 47s
Pushing b04d3c8 to main...

@rust-bors
rust-bors Bot merged commit b04d3c8 into rust-lang:main Aug 2, 2026
15 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

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 8c3a200 (parent) -> b04d3c8 (this PR)

Test differences

Show 2 test diffs

2 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 b04d3c8c22822b7f10dab5a563b4e2afff1861c1 --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. x86_64-gnu-gcc-core-tests: 17m 13s -> 8m 32s (-50.4%)
  2. dist-x86_64-apple: 4h 50m -> 2h 24m (-50.3%)
  3. x86_64-gnu-next-trait-solver-polonius: 39m 47s -> 57m 40s (+45.0%)
  4. optional-x86_64-gnu-autodiff: 52m 12s -> 35m 45s (-31.5%)
  5. dist-arm-linux-gnueabi: 1h 9m -> 1h 30m (+30.0%)
  6. pr-check-2: 39m 16s -> 28m 55s (-26.4%)
  7. dist-x86_64-msvc: 1h 45m -> 2h 11m (+24.8%)
  8. i686-msvc-1: 2h 56m -> 2h 14m (-23.9%)
  9. dist-powerpc64-linux-musl: 1h 37m -> 1h 14m (-23.7%)
  10. dist-loongarch64-musl: 1h 29m -> 1h 51m (+23.6%)
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 (b04d3c8): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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)
- - 0
Improvements ✅
(secondary)
-0.6% [-1.5%, -0.2%] 12
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.7%, 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)
- - 0
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 1
Improvements ✅
(secondary)
-1.7% [-6.1%, -0.4%] 5
All ❌✅ (primary) -0.7% [-0.7%, -0.7%] 1

Cycles

Results (primary 0.9%, 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.5%, 2.8%] 11
Regressions ❌
(secondary)
2.7% [0.4%, 15.4%] 15
Improvements ✅
(primary)
-0.6% [-0.7%, -0.5%] 3
Improvements ✅
(secondary)
-2.3% [-4.0%, -0.7%] 4
All ❌✅ (primary) 0.9% [-0.7%, 2.8%] 14

Binary size

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

Bootstrap: 488.148s -> 491.057s (0.60%)
Artifact size: 390.38 MiB -> 390.41 MiB (0.01%)

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. 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