You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(build): share precompiled headers for all targets
Our precompiled header setup has a few problems:
* Some libraries, such as quick-lint-js-tool-lib, are not built with
precompiled headers. This slows down incremental builds.
* Some executables, such as the benchmarks, get their own precompiled
headers. This slows down clean builds and also bloats disk usage.
Fix these problems by building at most two precompiled headers (one for
quick-lint-js-test and one for everything else) and using them for all
quick-lint-js targets (quick_lint_js_add_library and
quick_lint_js_add_executable).
Development clean build of quick-lint-js and quick-lint-js-test:
$ hyperfine --warmup=1 --prepare='rm -rf build && ./configure build' 'ninja -C build quick-lint-js-test quick-lint-js'
Before:
Time (mean ± σ): 12.686 s ± 0.068 s [User: 95.302 s, System: 7.395 s]
Range (min … max): 12.620 s … 12.861 s 10 runs
After:
Time (mean ± σ): 12.326 s ± 0.095 s [User: 84.436 s, System: 7.015 s]
Range (min … max): 12.238 s … 12.577 s 10 runs
CI approximation (clean build, 2 cores, builds benchmarks and Visual
Studio Code extension):
$ hyperfine --warmup=1 --prepare='rm -rf build && ./configure build' 'ninja -C build -j2'
Before:
Time (mean ± σ): 63.348 s ± 0.087 s [User: 116.393 s, System: 8.127 s]
Range (min … max): 63.189 s … 63.474 s 10 runs
After:
Time (mean ± σ): 48.508 s ± 0.030 s [User: 89.685 s, System: 6.250 s]
Range (min … max): 48.449 s … 48.552 s 10 runs
Benchmarks performed on my Apple M1 laptop with Clang 16.
0 commit comments