Resolver: Parallelize the import resolution loop - #158845
LorrensP-2158466 wants to merge 1 commit into
Conversation
|
Lets see what CI says. I have tried to add comments to changes to show my thought process behind them, but i'll make another pass here as well to be sure. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
17bd1cb to
9aa1069
Compare
This comment has been minimized.
This comment has been minimized.
9aa1069 to
a45ba86
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…r=<try> Resolver: Parallelize the import resolution loop
This comment has been minimized.
This comment has been minimized.
Again, we'll need to benchmark whether eliding this boolean assert even matters, considering that it's not even atomic. |
|
I'll split the |
Yes, after the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Rebased to fix conflicts and cleanup the PR, it now contains:
@rustbot ready. |
I don't think we'll merge this part, given the unconvincing perf results from the linked PR and the amount of complexity/unsafety. |
This comment has been minimized.
This comment has been minimized.
|
Force-pushed to keep up to date (and remove i'll wait on #158845 (comment), so i'll mark this @rustbot ready. |
|
Could you move the |
This comment has been minimized.
This comment has been minimized.
… parallel loop for import resolution. + impl `DynSend`/`DynSync` for all relevant data structures. + safety comments.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
rebased to fix conflicts and squash to one commit. @rustbot ready |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (dccb2bf): comparison URL. Overall result: no relevant changes - no action neededBenchmarking 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 countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 1.9%, secondary 2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.7%, secondary -4.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 488.069s -> 491.874s (0.78%) |
|
Ok, the implementation is good, now we need any benchmark showing that parallelizing import resolution is actually useful, and we can merge this. |
|
@petrochenkov Sorry for asking this... 😅 but by "any benchmark" do you mean any parallel benchmark of rustc-perf? or compiling some crates locally and showing that compile times improve with paralel import resolution and |
|
Not necessarily from rustc-perf, just any benchmark that shows green numbers from this change. |
View all comments
Follow up of #159440. This pr implements the parallel part of
par_for_each_slice. And implementsDynSendandDynSyncforRefOrMutandCmCellto make the call topar_for_each_slicecompile.This is the bare minimum to make the parallel loop work and is not at all optimized, this will follow :).
r? @petrochenkov