Skip to content

Short-circuit calculate_fallback_to_f32 when no float vars#156139

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
inq:minimize-reshell-perf
May 4, 2026
Merged

Short-circuit calculate_fallback_to_f32 when no float vars#156139
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
inq:minimize-reshell-perf

Conversation

@inq
Copy link
Copy Markdown
Contributor

@inq inq commented May 4, 2026

Sharing a small fix.

When no unresolved variable is a float_vid, no f32 fallback can apply,
so we can skip from_float_for_f32_root_vids (which walks the proof tree
of every pending obligation under the new solver — O(N × M) on crates
with many large obligations).

On ReShell: stage1 wall-clock 2m35s → 1m46s (-49s, ~31%).

Context + profile breakdown will be linked at
rust-lang/trait-system-refactor-initiative#254 after this PR opens.

r? @lcnr

@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 May 4, 2026
@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented May 4, 2026

👍
@bors r+ rollup=never

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 4, 2026

📌 Commit 55ff2e1 has been approved by lcnr

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 May 4, 2026
@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented May 4, 2026

@bors r-

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 4, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 4, 2026

This pull request was unapproved.

View changes since this unapproval

@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented May 4, 2026

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 4, 2026

📌 Commit 55ff2e1 has been approved by lcnr

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 4, 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 May 4, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 4, 2026

☀️ Test successful - CI
Approved by: lcnr
Duration: 3h 12m
Pushing cb40c25 to main...

@rust-bors rust-bors Bot merged commit cb40c25 into rust-lang:main May 4, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

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 1d72d7e (parent) -> cb40c25 (this PR)

Test differences

Show 6 test diffs

6 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 cb40c25f6aebb637163d26bf76a680ed6e5d1eda --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. dist-apple-various: 1h 52m -> 1h 18m (-29.8%)
  2. dist-various-2: 35m 25s -> 44m 17s (+25.0%)
  3. dist-armv7-linux: 1h 14m -> 1h 32m (+24.3%)
  4. x86_64-mingw-2: 2h 46m -> 2h 9m (-21.8%)
  5. x86_64-rust-for-linux: 55m 31s -> 45m 40s (-17.7%)
  6. x86_64-gnu-tools: 1h 5m -> 54m 15s (-17.1%)
  7. i686-gnu-1: 2h 22m -> 1h 58m (-16.7%)
  8. test-various: 2h 13m -> 1h 51m (-16.0%)
  9. dist-x86_64-musl: 2h 12m -> 1h 52m (-15.5%)
  10. x86_64-gnu-stable: 2h 25m -> 2h 4m (-14.1%)
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 (cb40c25): 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
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-21.0% [-87.6%, -0.0%] 18
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.3%, 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.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
4.8% [2.5%, 6.8%] 4
Improvements ✅
(primary)
-0.7% [-0.9%, -0.4%] 2
Improvements ✅
(secondary)
-3.3% [-9.3%, -0.4%] 8
All ❌✅ (primary) 0.3% [-0.9%, 2.2%] 3

Cycles

Results (primary 3.0%, secondary -18.9%)

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

mean range count
Regressions ❌
(primary)
3.0% [2.6%, 3.3%] 2
Regressions ❌
(secondary)
5.2% [2.8%, 7.2%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-34.2% [-84.6%, -0.4%] 11
All ❌✅ (primary) 3.0% [2.6%, 3.3%] 2

Binary size

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

Bootstrap: 494.198s -> 497.794s (0.73%)
Artifact size: 394.42 MiB -> 396.40 MiB (0.50%)

@rustbot rustbot added the perf-regression Performance regression. label May 4, 2026
@inq inq deleted the minimize-reshell-perf branch May 4, 2026 23:15
@panstromek
Copy link
Copy Markdown
Contributor

perf triage:

include-blob regressions are noise.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label May 5, 2026
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. perf-regression-triaged The performance regression has been triaged. 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