3 ms·
We have a fairly small but complex library written in Rust. a debug compile takes about 5 minutes from clean. Release takes 18 minutes. (1.38.0)
by fnord77 7y ago
We have a fairly small but complex library written in Rust.
a debug compile takes about 5 minutes from clean. Release takes 18 minutes. (1.38.0)
- ComputerGuru 7y agoHow much of that is linking? I have simple project where the linker used to take over an hour, but ld.lld is much faster.
- gameswithgo 7y agoDo you happen to be using a lot of trait bounds? I had a small library that was slow due to this, and was able to refactor from ~3 minute builds to ~6 seconds by grouping the trait bounds into marker traits. There is a compiler flag you can use to list where time is being spent and it showed all my time was spent dealing with those trait bounds. There is an open issue to make that not necessary. If your time is spent linking, you can swap the lld linker in
- kibwen 7y agoThough note that LLD isn't supported on Mac, so no luck there.
- pcwalton 7y agoThat seems like a bug. Please file it.
- kzrdude 7y agoIs the library still small if we count its dependencies too?