On Monday, 22 August 2016 at 01:34:36 UTC, jkpl wrote:
On Sunday, 21 August 2016 at 19:08:59 UTC, Matthias Klumpp wrote:
for a project like Terminix, dub with LDC builds in 8.6s, while Meson and ninja take only 6s here.

Did you try to build with DUB but with WIFI or ethernet interface toggled off ?

No, but I obviously excluded any download times, and also dependency build-times to be fair to dub.

But, with network access toggled off:

  debug build:
    dub: 0m8.60s
    ninja: 0m6.36s
  release build (standard args):
    dub: 0m12.923s
    ninja: 0m11.740s

 debug build:
    dub: 0m13.00s
    ninja: 0m13.04s
 release build:
    dub: 0m25.72s
    ninja: 0m19.19s

I ran these a few times, and the results were comparable, although I think if I would perform proper statistics the variance would be relatively high. Compiler was LDC 1.0.0 (on a Xeon E3-1231 v3).

One important thing about Ninja is that it will perform split-builds by default, so if you change something, only the changed piece needs to be recompiled. I *think* dub can do that too, but for some reason it never does it (even when using --parallel). That behavior drastically reduces compile times when working on a project. Also, Ninja knows about all the source files and generated files in advance, while dub needs to search for them on every run. That of course also has the drawback that one needs to specify the source files prior to building in the meson.build file.

Reply via email to