(Hopefully) Speeding up builds with Reggae: 1st results
Atila Neves via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 3 09:28:16 PDT 2015
To be able to measure against random projects I'd have to go and
write build descriptions for them, so I tried to concentrate on
dub packages.
Legend:
PackFull: Per-package compilation with reggae's ninja backend,
full build
PackSingle: Per-package compilation with reggae's ninja backend,
one file changed
ModFull: Per-module compilation with reggae's ninja backend, full
build
ModSingle: Per-module compilation with reggae's ninja backend,
one file changed
dubFull: dub build, full
dubSingle: dub build, one file changed
make: only applicable for SDC, hand-written makefile
All timings done on my laptop running Arch Linux with ld.gold
(therefore reducing the importance of linker time. And also cos I
use gold for everything). Includes running the linker.
PackFull PackSingle ModFull ModSingle dubFull
dubSingle makeFull makeSingle
DScanner 1.6 1.5 7.4 1.5 6.2
3.9
dub 2.4 0.9 3.8 0.9 2.6
2.6
mqtt 2.7 0.8 err err 7.0
1.9
Tango-D2 * **** 0.8 0.4 1.8 0.3 6.2
4.7
SDC * ** *** 6.2 4.2 9.9 3.1 err
err 5.8 3.0
dlangide err err err err 8.4
1.6
* failed to link with reggae
** link time significantly long
*** had to hand-edit the produced ninja build due to a bug
**** hack to get reggae to work with staticLibrary build
Weirdly SDC's Makefile is faster. It's got nothing to do with
ninja, the make backend produced similar results. Huh.
I think the results point to
1) Per-package is nearly always faster than per-module
2) reggae + ninja significantly faster than dub. When it works...
3) Even though the reggae build never finished for Tango, all
that was left was to link it. But look at those build times! I
checked to see how many .d files were built in both cases and
they matched.
Atila
More information about the Digitalmars-d
mailing list