[geos-devel] Quick cmake/autotools comparison on OpenSUSE

Mateusz Loskot mateusz at loskot.net
Fri Jan 29 22:34:24 EST 2010


strk wrote:
> FYI.
> Only 'make' was timed, no ./configure nor cmake runs.
> 
>> cat cmake/TIMING
> real    7m18.909s
> user    6m11.319s
> sys     0m42.419s
> 
>> cat autotools/TIMING
> time make
> ---------
> real    7m58.631s
> user    7m1.418s
> sys     0m43.067s

I timed only "make" command run on machine with
* Intel Core 2 Duo (P8600) 2.4GHz
* 4 GB RAM

$ cat cmake.log
Fri Jan 29 19:03:04 GMT 2010
Fri Jan 29 19:06:29 GMT 2010

$ cat ../autotools.log
Fri Jan 29 18:55:32 GMT 2010
Fri Jan 29 19:00:17 GMT 2010

However, it's important to keep notice that configuration for
CMake builds each version of C++ library, libgeos.so and libgeos.a,
all objects are built separately. It is intentional.
Even that CMake is ~20% faster.

$ date > LOG; make ; date >> LOG
Scanning dependencies of target geos
[  0%] Building CXX object
src/CMakeFiles/geos.dir/operation/valid/RepeatedPointTester.cpp.o
...
[ 49%] Building CXX object
src/CMakeFiles/geos.dir/linearref/LengthIndexOfPoint.cpp.o
Linking CXX shared library libgeos.so
[ 49%] Built target geos
Scanning dependencies of target geos-static
[ 49%] Building CXX object
src/CMakeFiles/geos-static.dir/operation/valid/RepeatedPointTester.cpp.o
..
[ 98%] Building CXX object
src/CMakeFiles/geos-static.dir/linearref/LengthIndexOfPoint.cpp.o
Linking CXX static library libgeos.a
[ 98%] Built target geos-static
...

Given that, Autotools timing should be compared to CMake x ~0.5

I can confirm that factor of speed x2 is what I observe with CMake
for most projects I build using CMake.
The QGIS use case confirms it as well:
http://blog.qgis.org/?q=node/16

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org


More information about the geos-devel mailing list