Skip to content

[BENCH] remove CacheCell and CacheRefCell aliases and directly use Lock and RwLock - #162418

Open
LorrensP-2158466 wants to merge 1 commit into
rust-lang:mainfrom
LorrensP-2158466:cache-cell-bench
Open

[BENCH] remove CacheCell and CacheRefCell aliases and directly use Lock and RwLock#162418
LorrensP-2158466 wants to merge 1 commit into
rust-lang:mainfrom
LorrensP-2158466:cache-cell-bench

Conversation

@LorrensP-2158466

@LorrensP-2158466 LorrensP-2158466 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Some changes from #158845 for benchmarking.

decided to change Mutex to datastructures::sync::Lock.

r? @petrochenkov

… and `RwLock` instead in places that need synchronization
@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 Sep 7, 2026
@mati865

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 7, 2026
[BENCH] remove `CacheCell` and `CacheRefCell` aliases and directly use `Lock` and `RwLock`
@petrochenkov

Copy link
Copy Markdown
Contributor

Even if there are minor regressions, we can merge this once the concerns about locking in macro scope compression (#158845 (comment)) are resolved.

@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2026
@rust-bors

rust-bors Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 798fc4c (798fc4c7778a8edd55282f90fd5f1f886488e775)
Base parent: 656a9da (656a9da186dacaf3bf8f7f7296a825d256cb4ae3)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (798fc4c): 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.4% [0.1%, 1.5%] 42
Regressions ❌
(secondary)
0.2% [0.1%, 0.2%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.1%] 2
All ❌✅ (primary) 0.4% [0.1%, 1.5%] 42

Max RSS (memory usage)

Results (primary 2.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)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
4.3% [2.8%, 6.8%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.8% [-7.3%, -4.4%] 3
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Cycles

Results (primary 0.6%, secondary 5.6%)

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

mean range count
Regressions ❌
(primary)
1.4% [0.5%, 2.6%] 11
Regressions ❌
(secondary)
5.6% [5.6%, 5.6%] 1
Improvements ✅
(primary)
-3.5% [-3.6%, -3.4%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-3.6%, 2.6%] 13

Binary size

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

Bootstrap: 478.991s -> 480.615s (0.34%)
Artifact size: 403.45 MiB -> 404.22 MiB (0.19%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 7, 2026
@Kobzol

Kobzol commented Sep 7, 2026

Copy link
Copy Markdown
Member

(The tokio benchmark was added today and might be a bit noisy at the start)

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.

6 participants