I'm doing a comparison of cargo check
on cargo itself - the difference seems pretty small:
Benchmark #1: rm -rf target/debug; ./target/release/cargo -Zrustc-check check
Time (mean ± σ): 19.190 s ± 0.275 s [User: 74.783 s, System: 9.683 s]
Range (min … max): 18.761 s … 19.756 s 10 runs
Benchmark #2: rm -rf target/debug; ./target/release/cargo check
Time (mean ± σ): 20.806 s ± 0.206 s [User: 75.121 s, System: 8.611 s]
Range (min … max): 20.451 s … 21.098 s 10 runs
Summary
'rm -rf target/debug; ./target/release/cargo -Zrustc-check check' ran
1.08 ± 0.02 times faster than 'rm -rf target/debug; ./target/release/cargo check'
It's not nothing, but hardly 2x faster or anything. Only one example; I'm sure there are some more extreme cases.
These are the corresponding cargo changes: GitHub - jsgf/cargo at rustc-emit-check