2 ms·
I'm not working with Rust but I just tried a quick benchmark by compiling a random project. git clone https://github.com/hyperium/hyper https://github.com/hype
by imtringued 7y ago
I'm not working with Rust but I just tried a quick benchmark by compiling a random project.
git clone https://github.com/hyperium/hyper https://github.com/hyperium/hyper
Full Build: time cargo build (1 min 42 seconds without download) (349K LOC total [0])
Recompile: time cargo build (2 seconds) (around 18k LOC)
I don't see the problem. The full build also includes all the 53 dependencies. So we are talking about a compilation speed of about 3.5k lines/s on a dual core 11" laptop from 2017 with turbo boost disabled.
I've personally worked on C++ projects where changing a single header can cause 5 minutes of compilation on an incremental build. Any slowdowns you have experienced may have been caused by a specific library or project.
[0] according to cloc ~/.cargo/registry/src/github.com-1ecc6299db9ec823/