Study: build times for D programs

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Tue Jul 24 12:49:38 PDT 2012


On Tue, 24 Jul 2012 18:53:25 +0200
Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:

> On 7/24/12, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
> > snip
> 
> I've got a codebase where it takes DMD 15 seconds to output an error
> message to stdout. The error message is 3000 lines long. (and people
> thought C++ errors were bad!). It's all thanks to this bug:
> http://d.puremagic.com/issues/show_bug.cgi?id=8082
> 
> The codebase isn't public yet so I can't help you with comparisons.
> Non-release full builds take 16 seconds for a template-heavy ~12k
> codebase (without counting lines of external dependencies). I use a
> lot of static foreach loops btw.
> 
> Personally I think full builds are very fast compared to C++, although
> the transition from a small codebase which takes less than a second to
> compile to a bigger codebase which takes over a dozen seconds to
> compile is an unpleasant experience. I'd love to see DMD speed up its
> compile-time features like templates, mixins, static foreach, etc.

Yea. Programs using Goldie ( semitwist.com/goldie ) take a long time to
compile (by D standards, not by C++ standards). I tried to benchmark
it a while back, and was never really confident in the results I was
getting or my understanding of the DMD source, so I never brought it up
before. But it *seemed* to be template matching that was the big
bottleneck (ie, IIUC, determining which template to instantiate,
and I think the function was actually called "match" or something like
that). Goldie does make use of a *lot* of that sort of thing.



More information about the Digitalmars-d mailing list