Skip to content

perf: remove cache in BoundVarReplacer - #166484

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scrabsha:perf/remove-cache-bound-var-replacer
Nov 26, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scrabsha:perf/remove-cache-bound-var-replacer

Conversation

@scrabsha

@scrabsha scrabsha commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

this brings a lot of tiny tiny IC improvements across the primary benchmarks and 0.28% IC reduction on tuple-stress.

this cache was introduced in #130821 and is no longer necessary. the tests introduced in this PR don't hang without the cache.

(also, it turns out the cache that really matters probably the one in SolverRelating (cf #166454 (comment))).

r? @nnethercote

Note

AI:0 AI:0 I've not used an LLM for any part of this PR, this includes any related work like research.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 24, 2026
@scrabsha

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue priority=-1

@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 Nov 24, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…, r=<try>

[EXPERIMENT] perf: remove cache in `BoundVarReplacer`
@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: e02c2c0 (e02c2c07e40b4fa4148c8d91bd872cf3a6aac795)
Base parent: 058c701 (058c701055c4b6f60f622d616afc0349911c38c3)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown

Finished benchmarking commit (e02c2c0): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@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.3% [-0.5%, -0.2%] 7
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 2.8%)

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)
2.8% [2.4%, 3.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 462.461s -> 458.701s (-0.81%)
Artifact size: 405.65 MiB -> 405.67 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 25, 2026
@scrabsha scrabsha changed the title [EXPERIMENT] perf: remove cache in BoundVarReplacer perf: remove cache in BoundVarReplacer Nov 25, 2026
@scrabsha
scrabsha marked this pull request as ready for review November 25, 2026 13:17
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 25, 2026
@nnethercote

Copy link
Copy Markdown
Contributor

Looks good.

@bors r+

cc @lcnr

@rust-bors

rust-bors Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 643c82d has been approved by nnethercote

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 Nov 26, 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 Nov 26, 2026
@rust-bors

rust-bors Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: nnethercote
Duration: 2h 53m 56s
Pushing 86e8c94 to main...

@rust-bors
rust-bors Bot merged commit 86e8c94 into rust-lang:main Nov 26, 2026
16 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 26, 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 6c709eb (parent) -> 86e8c94 (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 86e8c946f12c16ad26be9e4813cec57232290d99 --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-i686-msvc: 33m 41s -> 51m 36s (+53.2%)
  2. test-x86_64-msvc-ext1: 1h 40m -> 2h 20m (+39.4%)
  3. test-x86_64-gnu-stable: 1h 43m -> 2h 23m (+38.7%)
  4. test-x86_64-gnu-gcc: 57m 12s -> 1h 19m (+38.2%)
  5. test-x86_64-gnu: 2h 42m -> 1h 41m (-37.4%)
  6. dist-powerpc64-linux-gnu: 1h 6m -> 1h 29m (+35.0%)
  7. dist-s390x-linux: 1h 15m -> 1h 38m (+30.1%)
  8. dist-x86_64-llvm-mingw: 1h 39m -> 2h 7m (+29.1%)
  9. dist-riscv64-linux-musl: 1h 14m -> 1h 34m (+27.8%)
  10. dist-powerpc-linux: 1h 17m -> 1h 37m (+27.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

Finished benchmarking commit (86e8c94): 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.2%, -0.2%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 3.0%, 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)
3.0% [3.0%, 3.0%] 1
Regressions ❌
(secondary)
1.8% [0.8%, 2.8%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 2
All ❌✅ (primary) 3.0% [3.0%, 3.0%] 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: 460.462s -> 461.669s (0.26%)
Artifact size: 405.59 MiB -> 405.59 MiB (0.00%)

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.

4 participants