Skip to content

Avoid the arena_cache modifier for several queries - #162105

Draft
Zalathar wants to merge 6 commits into
rust-lang:mainfrom
Zalathar:arena-cache
Draft

Avoid the arena_cache modifier for several queries#162105
Zalathar wants to merge 6 commits into
rust-lang:mainfrom
Zalathar:arena-cache

Conversation

@Zalathar

@Zalathar Zalathar commented Sep 1, 2026

Copy link
Copy Markdown
Member

The arena_cache query modifier is convenient, but we can potentially avoid some overhead by allocating values into the central tcx.arena when possible.

There should be no change to compiler output.

@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 Sep 1, 2026
@Zalathar

Zalathar commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 1, 2026
Avoid the `arena_cache` modifier for several queries
@rust-bors

rust-bors Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 6f7d022 (6f7d022409d054eabfd477aad3fabdfbd1d91cbc)
Base parent: 7022271 (70222712809cd5cc1718ed8995914a1cbacb6b92)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (6f7d022): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

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.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

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

Max RSS (memory usage)

Results (primary -1.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)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
3.4% [0.8%, 6.7%] 9
Improvements ✅
(primary)
-1.5% [-3.4%, -0.7%] 10
Improvements ✅
(secondary)
-2.0% [-3.2%, -0.8%] 13
All ❌✅ (primary) -1.3% [-3.4%, 1.1%] 11

Cycles

Results (primary 2.4%, secondary 7.9%)

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

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
7.9% [2.1%, 13.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

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

Bootstrap: 475.539s -> 474.177s (-0.29%)
Artifact size: 400.59 MiB -> 400.51 MiB (-0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants