[cfe-dev] [llvm-dev] Who wants faster LLVM/Clang builds?

David Chisnall via cfe-dev cfe-dev at lists.llvm.org
Wed Dec 6 00:45:01 PST 2017


On 5 Dec 2017, at 23:40, Mikhail Zolotukhin via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> The list of files for which removing redundant headers improved compile time (the numbers are compile time in seconds for a Debug build):

A few comments:

First, your old and new numbers are giving time to a hundredth of a second, yet I generally see a variation of 0.1-0.2 seconds between runs.  How many times did you run each one and what is the Welch’s t-test delta?

Second, most of the changes are a few tenths of a second.  From the whole of your top 10, it looks as if you’re shaving around 3 seconds off the total build.  Presumably this is CPU time, so on a -j8 parallel build you’re saving under a second for something that takes a few minutes.  That doesn’t mean it’s not worth doing, but it does mean that if it has any impact on code maintainability then it probably isn’t.

Third, it’s not clear from your measurements whether you were doing a modules build or not.  The cost of redundant includes should be a lot lower if we’re using modules.

Finally, redundant includes can have a counterintuitive positive benefit on overall build times by warming the buffer cache (pulling in an include early when the dependency graph for the build is wide lets another compile job proceed while you’re waiting for disk, whereas pulling it in later when you’ve exhausted the parallelism in the build process causes a synchronous stall).  Did you measure the deltas in overall build time for a cold and warm disk cache after making these changes?

David





More information about the cfe-dev mailing list