# check-cfg perf evaluation Was done using `hyperfine` on an Intel Core i7-7700HQ (4 cores, 3.8GHz max). They represent both extreme, helloworld (0 feature and 1 cfg) and windows-rs (~700 features and >99000 cfgs). ## `windows` ``` $ hyperfine --prepare "cargo clean" "cargo +nightly check" "cargo +nightly check -Zcheck-cfg" Benchmark 1: cargo +nightly check Time (mean ± σ): 805.4 ms ± 12.5 ms [User: 675.2 ms, System: 150.8 ms] Range (min … max): 792.1 ms … 824.6 ms 10 runs Benchmark 2: cargo +nightly check -Zcheck-cfg Time (mean ± σ): 822.5 ms ± 11.9 ms [User: 691.1 ms, System: 150.7 ms] Range (min … max): 803.6 ms … 836.6 ms 10 runs Summary cargo +nightly check ran 1.02 ± 0.02 times faster than cargo +nightly check -Zcheck-cfg ``` Or around +17.1ms for 4 (local) crates, with the being one being at ~700 features and 99102 total `#[cfg]`s in the code! (Also note that there was 10/15 warnings and they were not suppressed so the linting/display machinery was printing them) ## helloworld (lib) ``` $ hyperfine --prepare "cargo clean" "cargo +nightly check" "cargo +nightly check -Zcheck-cfg" Benchmark 1: cargo +nightly check Time (mean ± σ): 67.5 ms ± 1.1 ms [User: 30.3 ms, System: 34.9 ms] Range (min … max): 65.9 ms … 69.2 ms 20 runs Benchmark 2: cargo +nightly check -Zcheck-cfg Time (mean ± σ): 67.4 ms ± 0.9 ms [User: 31.0 ms, System: 34.0 ms] Range (min … max): 65.4 ms … 69.4 ms 21 runs Summary cargo +nightly check -Zcheck-cfg ran 1.00 ± 0.02 times faster than cargo +nightly check ``` No visible impact.