Separate preprocess and compile: some performance numbers
Boris Kolpackov
boris@codesynthesis.com
Thu May 18 13:17:00 GMT 2017
Hi,
I have implemented the separate preprocess and compile setup in build2.
For GCC it is using -fdirectives-only (thanks to everyone's suggestions
in the earlier thread). I've also done some benchmarking:
https://build2.org/article/preprocess-compile-performance.xhtml
TL;DR for GCC:
Surprisingly, a separate preprocessor run is about 1% faster (probably
because of the time-localization of filesystem access). Overall, a
preprocessor run costs about 5% of a non-optimized C++ build.
Boris
More information about the Gcc
mailing list