Performance optimization in av::fixup - use buffered IO, not mapped file

Ryan Johnson
Wed Dec 12 21:16:00 GMT 2012

On 12/12/2012 2:35 PM, Corinna Vinschen wrote:
> Idle musing:  It would be interesting to know if building and testing a
> gcc toolchain would run much faster if we disable the automatic
> spare-file creation in lseek/write.

After de-sparsing all executables generated by `make stage1-all-gcc', 
the subsequent invocation of `make -j2 stage1-all' generates 475 .o 
files in two minutes on my laptop.

Assuming sparse-file penalties of 2s per invocation, that's 16 
cpu-minutes saved, or 8.9x speedup for that part of the build.

Building stage2-all-gcc (which includes several ./configure script runs 
using the now de-sparsed stage1 gcc) generates near-zero disk activity 
and appears to run as fast as the stage1 configure did. There are eight 
configure scripts to run, and assuming each has 50 tests that invoke gcc 
means another 13 cpu-minutes saved.

Do that two more times, and we've saved 97 cpu-minutes to finish bootstrap.

I've never run the test suite, but it has what, 50k c and c++ files in 
it? That would mean 28 cpu-hours saved.


More information about the Cygwin-developers mailing list