Study: build times for D programs

Jonathan M Davis jmdavisProg at gmx.com
Tue Jul 24 15:18:53 PDT 2012


On Tuesday, July 24, 2012 15:49:38 Nick Sabalausky wrote:
> 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.

I don't have any hard evidence for it, but I've always gotten the impression 
that it was templates, mixins, and CTFE which really slowed down compilation. 
Certainly, they increase the memory consumption of the compiler by quite a 
bit. My guess would be that if we were looking to improve the compiler's 
performance, that's where we'd need to focus. But we'd have to actually profile 
the compiler on a variety of projects to be sure of that (which is at least 
partially related to what Andrei is suggesting).

- Jonathan M Davis


More information about the Digitalmars-d mailing list