Re: Experiment: compiling glib with Meson



On Fri, Aug 9, 2013 at 7:07 PM, Damien Lespiau <damien lespiau gmail com> wrote:
 
On Wed, Aug 7, 2013 at 9:41 PM, Jussi Pakkanen <jpakkane gmail com> wrote:
Configure time for Meson: 5 seconds
Configure for autotools (autogen + configure): 53 seconds

Out of curiosity, do you also have some somewhat comparable compilation time numbers?

Sure, just take these with at least as much of a grain of salt as the previous tests. :)

These tests were run with a 2011 Macbook Pro. Autotools build setup was configured with './configure CFLAGS="-O0 -g" CXXFLAGS="-O0" -g --with-pcre=system' and built with 'cd glib; make gtester'. This builds just the glib portion. Meson was configured with default settings and built with 'ninja glib/libglib.so.3.36.3'. All tests were run with hot cache and the fastest time was always chosen.

Build times with one process

Autotools: 14s
Meson: 9s

Build time with 4 processes

Autotools: 4.5s
Meson: 3.6s

Build time with 4 processes + CCache

Autotools: 1.15s
Meson: 0.29s

Meson has a few features which make it fast but don't show up in these tests. First, because it uses Ninja rather than Make, no-op builds take less than a second even if you have 20 000 source files.

Secondly Meson does smart relinking. Suppose you have shared library A and executable B that links against it. If you alter A in a way that does not change its ABI, then Meson will build A but will skip relinking B because it is not necessary. (This feature was swiped from LibreOffice's build system.) This speeds up the common case where you have a shared library and dozens of tests that link against it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]