Skip to content

[WIP] Benchmarking for the parallel import resolution PR #158845#159387

Closed
petrochenkov wants to merge 1 commit into
rust-lang:mainfrom
petrochenkov:parimbench
Closed

[WIP] Benchmarking for the parallel import resolution PR #158845#159387
petrochenkov wants to merge 1 commit into
rust-lang:mainfrom
petrochenkov:parimbench

Conversation

@petrochenkov

@petrochenkov petrochenkov commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Right now this is #158845, but without migrating from (Ref)Cells to RwLocks.

@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 Jul 16, 2026
@rustbot

rustbot commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

r? @mati865

rustbot has assigned @mati865.
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 75 candidates
  • Random selection from 18 candidates

@petrochenkov

Copy link
Copy Markdown
Contributor 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 Jul 16, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 16, 2026
[WIP] Benchmarking for the parallel import resolution PR #158845
@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 16, 2026
@rust-bors

rust-bors Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 13552f1 (13552f1006b11746bd9d961daf95208959004eda)
Base parent: d62fb1c (d62fb1c8a007f6967376a52da8315ae51b64a70c)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (13552f1): 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 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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.3%, -0.1%] 24
Improvements ✅
(secondary)
-0.6% [-1.6%, -0.1%] 27
All ❌✅ (primary) -0.2% [-0.3%, -0.1%] 24

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 489.85s -> 489.443s (-0.08%)
Artifact size: 389.48 MiB -> 389.43 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 16, 2026
LorrensP-2158466 added a commit to LorrensP-2158466/rust that referenced this pull request Jul 17, 2026
…par_slice`.

Currently it is all still single threaded, but almost everything needed to make the loop use multithreaded code is done in this commit.

For performance reasons we do the resolution now in place instead of recollecting the indeterminate imports ([see benchmark pr](rust-lang#159387) and pr of this commit).

With the accompanying changes to make datastructures concurrent:
- populating external resolution tables now use `Once` to ensure only 1 thread builds the table and all others wait if they need it
- implement `DynSync`/`DynSend` for `RefOrMut` and `CmCell` so it is allowed to use the `par_slice` function.

`Cache(Ref)Cells` are not tackled yet because they are not needed here (and require extra work).
LorrensP-2158466 added a commit to LorrensP-2158466/rust that referenced this pull request Jul 17, 2026
…par_slice`.

Currently it is all still single threaded, but almost everything needed to make the loop use multithreaded code is done in this commit.

For performance reasons we do the resolution now in place instead of recollecting the indeterminate imports ([see benchmark pr](rust-lang#159387) and pr of this commit).

With the accompanying changes to make datastructures concurrent:
- populating external resolution tables now use `Once` to ensure only 1 thread builds the table and all others wait if they need it
- implement `DynSync`/`DynSend` for `RefOrMut` and `CmCell` so it is allowed to use the `par_slice` function.

`Cache(Ref)Cells` are not tackled yet because they are not needed here (and require extra work).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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