Make sure you’re using a fast linker. Although I think lld is the default now, so that should be less of a concern these days. But see if mold or wild would help.
More relevantly, you should be using cranelift for codegen in dev builds.
If you have codegen-units = 1 in your release profile, make sure you have a separate dev profile that doesn’t.
If you still experience decapitating slowness (doubtful), and it’s actually the rust compiler being slow (super doubtful), you can try the parallel frontend. Apparently there are almost™ no bugs left in its implementation (It’s one of the project priorities now).
Needless to say, but you should be checking your --timings to really know what’s going on.
Make sure you’re using a fast linker. Although I think
lldis the default now, so that should be less of a concern these days. But see ifmoldorwildwould help.More relevantly, you should be using cranelift for codegen in dev builds.
If you have
codegen-units = 1in yourreleaseprofile, make sure you have a separate dev profile that doesn’t.If you still experience decapitating slowness (doubtful), and it’s actually the rust compiler being slow (super doubtful), you can try the parallel frontend. Apparently there are almost™ no bugs left in its implementation (It’s one of the project priorities now).
Needless to say, but you should be checking your
--timingsto really know what’s going on.thanks will see what happens
The various linkers do make a difference, but all of them choke, eventually, when individual files get too massive.