break rustc_expand-rustc_middle dependency - #161263
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in src/tools/cargo cc @weihanglo |
|
rustbot has assigned @JonathanBrouwer. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Shouldn't show up in single job benchmarks, but still: I'll also do another benchmark later where the derive expander is always called through the atomic ref (with @bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
This comment has been minimized.
This comment has been minimized.
break rustc_expand-rustc_middle dependency
|
Queued e3517d8 with parent e702eca, future comparison URL. |
Back in #145354 (cc @Kobzol), support for caching derive macros was added. With this, rustc_expand was made to depend on rustc_middle.
This PR breaks that dependency so that rustc_expand and rustc_builtin_macros can compile in parallel with rustc_middle.
The timing graph goes from this:

to this:

Note that the interval where we're exclusively compiling rustc_middle has become much shorter.
Full graphs here:
cargo-timing-main.html
cargo-timing-expand2.html
It's somewhat hard to benchmark reliably but a full bootstrap is about 5-10 seconds faster overall, on a machine with an Amd Ryzen 5900x 12-core processor.