Idea #1 on integrating RC with GC

Daniel Murphy yebbliesnospam at gmail.com
Mon Feb 10 21:17:07 PST 2014


"Xavier Bigand"  wrote in message news:ldbohi$1ohh$1 at digitalmars.com...
> Boostrapping D, will certainly reveal some issue with GC? I don't know 
> much about compilers, but certainly the parser may see some performance 
> gains with GC and the other parts? Maybe some major loose?

The parser allocates lots of memory without freeing any (the entire parsed 
ast), so a GC cannot possibly be an improvement there over the current 
strategy of C++ new + never delete.

DDMD has predictably shown that there is a performance hit, even with 
collections disabled, compared with the highly tuned allocator used in the 
C++ version.

The big plus of a GC for the compiler is that now ctfe is much less likely 
to cause the compiler to run out of memory, as all the temporary objects 
generated while interpreting will be garbage collected. 



More information about the Digitalmars-d mailing list