DMD compilation speed
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Mon Mar 30 21:56:13 PDT 2015
"w0rp" wrote in message news:leajtjgremulowqoxqpc at forum.dlang.org...
> I sometimes think DMD's memory should be... garbage collected. I used the
> forbidden phrase!
>
> Seriously though, allocating a bunch of memory until you hit some maximum
> threshold, possibly configured, and freeing unreferenced memory at that
> point, pausing compilation while that happens? This is GC. I wonder if
> someone enterprising enough would be willing to try it out with DDMD by
> swapping malloc calls with calls to D's GC or something.
I've used D's GC with DDMD. It works*, but you're trading better memory
usage for worse allocation speed. It's quite possible we could add a switch
to ddmd to enable the GC.
* Well actually it currently segfaults, but not because of anything
fundamentally wrong with the approach.
After switching to DDMD we will have a HUGE number of options readily
available for reducing memory usage, such as using allocation-free range
code and enabling the GC.
More information about the Digitalmars-d
mailing list