Skip to content

perf: Make stable_crate_ids reads lock-free after crate loading#158185

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xmakro:perf/stable-crate-ids-lockfree
Jun 27, 2026
Merged

perf: Make stable_crate_ids reads lock-free after crate loading#158185
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xmakro:perf/stable-crate-ids-lockfree

Conversation

@xmakro

@xmakro xmakro commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@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 Jun 20, 2026
@workingjubilee

Copy link
Copy Markdown
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
perf: Make stable_crate_ids reads lock-free after crate loading
@rust-bors

rust-bors Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: ba63cbe (ba63cbef0d118b3293af7c2e748a9f44efbabd3a)
Base parent: 8b6558a (8b6558a02b2774acfb25cf15e199467c37ba7490)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (ba63cbe): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@bors rollup=never
@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.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.2%] 8
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 1

Max RSS (memory usage)

Results (primary 1.4%, secondary 1.2%)

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.7%, 2.1%] 2
Regressions ❌
(secondary)
3.2% [2.5%, 3.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-2.8%, -0.7%] 2
All ❌✅ (primary) 1.4% [0.7%, 2.1%] 2

Cycles

Results (primary -0.5%, secondary 1.3%)

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

mean range count
Regressions ❌
(primary)
1.4% [1.4%, 1.4%] 1
Regressions ❌
(secondary)
3.3% [2.7%, 3.8%] 2
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) -0.5% [-2.4%, 1.4%] 2

Binary size

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

Bootstrap: 482.01s -> 480.669s (-0.28%)
Artifact size: 391.28 MiB -> 391.17 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 21, 2026
@xmakro xmakro marked this pull request as ready for review June 26, 2026 15:19
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 26, 2026
@rustbot

rustbot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

r? @mu001999

rustbot has assigned @mu001999.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 18 candidates

@mu001999

Copy link
Copy Markdown
Member

LGTM, thanks!

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7c96471 has been approved by mu001999

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1. This pull request will be tested once the tree is reopened.

@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 Jun 26, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #158438 (Use rigidness marker in fast_reject)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158185 (perf: Make stable_crate_ids reads lock-free after crate loading)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158382 (Add safety section for SliceIndex::get_unchecked(mut))
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158446 (Update Enzyme submodule)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #158438 (Use rigidness marker in fast_reject)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158185 (perf: Make stable_crate_ids reads lock-free after crate loading)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158382 (Add safety section for SliceIndex::get_unchecked(mut))
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158446 (Update Enzyme submodule)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
rust-bors Bot pushed a commit that referenced this pull request Jun 27, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - #158438 (Use rigidness marker in fast_reject)
 - #157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - #158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - #158185 (perf: Make stable_crate_ids reads lock-free after crate loading)
 - #158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - #158355 (Fixup the refactoring errors in #156246)
 - #158361 (Move `check_ffi_pure` into the attribute parser)
 - #158382 (Add safety section for SliceIndex::get_unchecked(mut))
 - #158399 (std: truncate thread names on NetBSD)
 - #158418 (Eliminate double length check in `Vec::into_array`)
 - #158430 (Guard clone suggestion against empty obligation errors)
 - #158446 (Update Enzyme submodule)
 - #158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
@rust-bors rust-bors Bot merged commit 4631799 into rust-lang:main Jun 27, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 27, 2026
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Jun 27, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#153697 (Add arg splat experiment initial tuple impl)
 - rust-lang/rust#158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children)
 - rust-lang/rust#158438 (Use rigidness marker in fast_reject)
 - rust-lang/rust#157127 (cg_LLVM: Stop needing an alloca for volatile loads)
 - rust-lang/rust#158376 (Suggest `>=` for `=>` typo in closure and call argument positions)
 - rust-lang/rust#158185 (perf: Make stable_crate_ids reads lock-free after crate loading)
 - rust-lang/rust#158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` )
 - rust-lang/rust#158355 (Fixup the refactoring errors in rust-lang/rust#156246)
 - rust-lang/rust#158361 (Move `check_ffi_pure` into the attribute parser)
 - rust-lang/rust#158382 (Add safety section for SliceIndex::get_unchecked(mut))
 - rust-lang/rust#158399 (std: truncate thread names on NetBSD)
 - rust-lang/rust#158418 (Eliminate double length check in `Vec::into_array`)
 - rust-lang/rust#158430 (Guard clone suggestion against empty obligation errors)
 - rust-lang/rust#158446 (Update Enzyme submodule)
 - rust-lang/rust#158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@rust-timer build 9087db2
Perf run for #158455
Perf improvement expected

@mu001999 This should probably have been rollup=iffy because of the perf effect <3

@rust-timer

This comment has been minimized.

@mu001999

Copy link
Copy Markdown
Member

This should probably have been rollup=iffy because of the perf effect <3

Sorry, I’d thought iffy/never was only needed when there was a perf regression. I know now, thanks <3

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (9087db2): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@bors rollup=never
@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%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (secondary -0.9%)

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

Binary size

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

Bootstrap: 486.597s -> 484.816s (-0.37%)
Artifact size: 395.64 MiB -> 395.15 MiB (-0.12%)

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.

6 participants