Apologies, I should have mentioned that. It's been about 9 months.
https://github.com/sanxiyn/sandbox/blob/master/rust/time-2.p...
crates.io backend service:
# Note the thing pulls down lots of dependencies doing
# install, so this is after a "cargo build;cargo clean":
git clone git@github.com:rust-lang/crates.io.git crates.io.git
cd crates.io.git/
./script/init-local-index.sh
multirust run nightly cargo build --release
multirust run nightly cargo clean
# 4 threads, ~100% CPU up to compiling the final cargo.io bit,
# which takes the longest:
git diff
diff --git a/Cargo.toml b/Cargo.toml
index cf99b60..02e54fb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,6 +5,7 @@ version = "0.1.0"
[profile.release]
opt-level = 2
+codegen-units = 4
[lib]
name = "cargo_registry"
$ time multirust run nightly cargo build --release
real 1m29.082s
user 4m47.276s
sys 0m6.196s
# Single threades (default Cargo.toml):
real 1m41.210s
user 4m0.376s
sys 0m5.120s
Servo: git clone https://github.com/servo/servo servo.git
cd servo.git/
./mach build --release
(Servo also pulls down lots of dependencies, including a full rust
toolchain...) ./mach clean
time ./mach build --release
Build completed in 791.07s
real 13m11.874s
user 40m21.468s
sys 0m51.304s
At approximately 100% cpu for the first part, either the servo build
script makes sure things are parallelized, or the Cargo.toml-settings
are set for parallell builds (haven't checked).And finally, a smaller project:
git clone https://github.com/Aaronepower/tokei.git
cd tokei/
cargo build --release
cargo clean
$ time cargo build --release
real 0m30.354s
user 0m32.708s
sys 0m0.444s
According to tokei (which is a blazingly fast cloc tool), there's ~100k
cloc of rust in servo, ~7500 cloc of Rust in crates.io (but that doesn't
include all the dependencies...).After doing a clean install of rust stable with multirust, the combined cloc of stuff under ~/.multirust...cargo/src and tokei is ~11.5k cloc of rust, along with ~ 1400 cloc of c++.