Skip to content

perf: remove cache in FoldEscapingRegions - #166453

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scrabsha:perf/remove-cache-fold-escaping-regions
Nov 25, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scrabsha:perf/remove-cache-fold-escaping-regions

Conversation

@scrabsha

@scrabsha scrabsha commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

this cache was introduced in #135783 and does not serve its original purpose anymore. removing it does not affect performance.

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 Bot pushed a commit that referenced this pull request Nov 24, 2026
…ons, r=<try>

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

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 87af8cc (87af8cc9ced30ccfd1843f75f39f92bbef20014e)
Base parent: 058c701 (058c701055c4b6f60f622d616afc0349911c38c3)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown

Finished benchmarking commit (87af8cc): 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%] 4
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (secondary 2.4%)

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

Binary size

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

Bootstrap: 462.461s -> 461.142s (-0.29%)
Artifact size: 405.65 MiB -> 405.70 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 25, 2026
@scrabsha

scrabsha commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

@nnethercote: this one gives -0.16% - -0.46% instruction counts on include-blob (which is a secondary benchmark) and no regression. the rest is below significance threshold. do you think it's worth merging?

@Kobzol

Kobzol commented Nov 25, 2026

Copy link
Copy Markdown
Member

Just noting that the include-blob results are noise:
image

Unfortunately the benchmark has been noisy lately.

@scrabsha

Copy link
Copy Markdown
Contributor Author

oh, thank you for pointing this out (and indeed, i completely forgot there was a thread on Zulip about this >.<).

i think we should still merge this, considering that this cache does not improve perf in any way, and removing it makes the code a tad simpler. what do you think?

@nnethercote

Copy link
Copy Markdown
Contributor

Removing it for having no effect sounds good. One thing: can you check the PR that introduced it, and just check if there were any motivating test cases that aren't captured by the rustc-perf benchmark suite? If so, make sure that they don't regress.

@scrabsha

Copy link
Copy Markdown
Contributor Author

so: this cache was introduced in #135783 because of a hang. the tests that were introduced as part of this PR (post-mono-higher-ranked-hang.rs, post-mono-higher-ranked-hang-2.rs) don't hang when removing this cache.

@scrabsha
scrabsha marked this pull request as ready for review November 25, 2026 10:24
@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
@scrabsha scrabsha changed the title [EXPERIMENT] perf: remove cache in FoldEscapingRegions perf: remove cache in FoldEscapingRegions Nov 25, 2026
@nnethercote

Copy link
Copy Markdown
Contributor

Sorry, I overlooked that you already mentioned #135783 in the PR description. LGTM.

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b90f859 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 25, 2026
@scrabsha

Copy link
Copy Markdown
Contributor Author

this was done thanks to a magic trick known as "edit PR description" :D

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

Rollup of 9 pull requests

Successful merges:

 - #166487 (core: Use autotests to split up coretests)
 - #165145 (Various incr comp session refactors)
 - #165337 (Windows: Don't make RwLock writers race readers)
 - #165732 (feat: rename region obligations)
 - #166061 (Offload: generic kernels in a lib)
 - #166539 (Restore the section in `global-target-feature.rs`)
 - #165721 (avoid Terminator:None in coroutine drop shim building)
 - #166453 (perf: remove cache in `FoldEscapingRegions`)
 - #166547 (Pin i686 msvc)
@rust-bors
rust-bors Bot merged commit 45918de into rust-lang:main Nov 25, 2026
15 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 25, 2026
Rollup merge of #166453 - scrabsha:perf/remove-cache-fold-escaping-regions, r=nnethercote

perf: remove cache in `FoldEscapingRegions`
mehmettoplu-rs pushed a commit to mehmettoplu-rs/miri that referenced this pull request Nov 26, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#166487 (core: Use autotests to split up coretests)
 - rust-lang/rust#165145 (Various incr comp session refactors)
 - rust-lang/rust#165337 (Windows: Don't make RwLock writers race readers)
 - rust-lang/rust#165732 (feat: rename region obligations)
 - rust-lang/rust#166061 (Offload: generic kernels in a lib)
 - rust-lang/rust#166539 (Restore the section in `global-target-feature.rs`)
 - rust-lang/rust#165721 (avoid Terminator:None in coroutine drop shim building)
 - rust-lang/rust#166453 (perf: remove cache in `FoldEscapingRegions`)
 - rust-lang/rust#166547 (Pin i686 msvc)
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Nov 27, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#166487 (core: Use autotests to split up coretests)
 - rust-lang/rust#165145 (Various incr comp session refactors)
 - rust-lang/rust#165337 (Windows: Don't make RwLock writers race readers)
 - rust-lang/rust#165732 (feat: rename region obligations)
 - rust-lang/rust#166061 (Offload: generic kernels in a lib)
 - rust-lang/rust#166539 (Restore the section in `global-target-feature.rs`)
 - rust-lang/rust#165721 (avoid Terminator:None in coroutine drop shim building)
 - rust-lang/rust#166453 (perf: remove cache in `FoldEscapingRegions`)
 - rust-lang/rust#166547 (Pin i686 msvc)
mehmettoplu-rs pushed a commit to mehmettoplu-rs/rustc_codegen_gcc that referenced this pull request Nov 27, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#166487 (core: Use autotests to split up coretests)
 - rust-lang/rust#165145 (Various incr comp session refactors)
 - rust-lang/rust#165337 (Windows: Don't make RwLock writers race readers)
 - rust-lang/rust#165732 (feat: rename region obligations)
 - rust-lang/rust#166061 (Offload: generic kernels in a lib)
 - rust-lang/rust#166539 (Restore the section in `global-target-feature.rs`)
 - rust-lang/rust#165721 (avoid Terminator:None in coroutine drop shim building)
 - rust-lang/rust#166453 (perf: remove cache in `FoldEscapingRegions`)
 - rust-lang/rust#166547 (Pin i686 msvc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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