DMD compilation speed

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 11 08:58:33 PST 2016


On Thu, 11 Feb 2016 09:04:22 +0000, Ola Fosheim Grøstad wrote:

> On Thursday, 11 February 2016 at 08:57:22 UTC, Andrea Fontana wrote:
>> Zooming on graph you can see that the improvement was due to this:
>> https://github.com/D-Programming-Language/dmd/pull/4923
> 
> But why? Is it using the GC, or what?

>From dmd/src/mars.d:

version (GC)
{
}
else
{
  GC.disable();
}

And the compiler is still not compiled with -version=GC by default, as 
far as I can determine.

The talks I've heard suggested that DMD may hide pointers where the GC 
can't find them (a relic from the C++ days), producing crashes and memory 
corruption when the GC is enabled. So the GC was disabled for stability.

That trend of memory reduction holds for the other samples, so this is 
probably something to do with the compiler rather than, say, writefln 
changing implementation to require much less memory to compile. But I'm 
not sure what might have caused it.


More information about the Digitalmars-d mailing list