[CMake] FYI - From Ninja-build mailing list - Fwd: Proposal: restat rules
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Sep 30 12:41:35 EDT 2011
On Friday 30 September 2011, Peter Kuemmel wrote:
> > Tested cmake/ninja with Blender's cmake files, works well, and fast!
> > Single file rebuild is 0.97 sec, same on makefiles was 3.7sec.
>
> I also have some numbers:
>
> ----------------------------
> Building LyX (lyx.org, 676 files):
>
> LyX has autotools and cmake as build system.
>
>
>
> * cmake generated ninja files:
>
> 1. build
> cmake -G Ninja
> time ninja
> real 1m15.862s
>
> 2. dry run
> ninja
> real 0m0.113s
>
> 3. rebuild one file
> touch ../trunk/src/LyX.cpp
> time ninja
> real 0m7.340s
>
>
>
> * cmake generated Makefiles:
>
> 1. build
> cmake ../trunk
> time make -j9
> real 1m19.471s
>
> 2. dry run
> time make -j9
> real 0m1.457s
>
> 3. rebuild one file
> touch ../trunk/src/LyX.cpp
> time make -j9
> real 0m7.952s
>
>
>
> * autotools:
>
> 1. build
> ./configure --enable-build-type=dev (maybe different to cmake
> configuration) time make -j9
> real 3m19.988s
>
> 2. dry run
> time make -j9
> real 0m2.165s
>
> 3. rebuild one file
> touch ../trunk/src/LyX.cpp
> time make -j9
> real 0m13.087s
>
>
>
>
> Summary:
>
> build dry rebuild
> ninja 1m15.8 0m0.1 0m07.3
> make 1m19.4 0m1.4 0m07.9
> auto 3m19.9 0m2.1 0m13.0
>
> So only the dry run shows a huge speedup (10-20 times faster)
Not to question your numbers, but shouldn't the difference of the dryrun
(1.3s) also be present in the rebuild ?
I mean, this should be the time ninja is faster in checking whether any file
changed, and in the rebuild case it has to do that too, and additionally build
one file ?
How often did you measure this, just once or multiple times ?
Alex
More information about the CMake
mailing list