www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - (Hopefully) Speeding up builds with Reggae: 1st results

reply "Atila Neves" <atila.neves gmail.com> writes:
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
Jun 03 2015
parent reply "Brad Anderson" <eco gnuk.net> writes:
On Wednesday, 3 June 2015 at 16:28:17 UTC, Atila Neves wrote:
 [snip]


                  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
NG linewrapping killed the formatting here. Here's a table: https://gist.github.com/eco/956c3a5cc7c46b2bf641
Jun 03 2015
parent "Brad Anderson" <eco gnuk.net> writes:
On Wednesday, 3 June 2015 at 17:00:06 UTC, Brad Anderson wrote:
 On Wednesday, 3 June 2015 at 16:28:17 UTC, Atila Neves wrote:
 [snip]


                 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
NG linewrapping killed the formatting here. Here's a table: https://gist.github.com/eco/956c3a5cc7c46b2bf641
Oh and double check my formatting, if you could. You can hit Edit if anything is wrong.
Jun 03 2015