GC implementation
Sean Kelly
sean at f4.ca
Fri Mar 24 13:56:54 PST 2006
Georg Wrede wrote:
>
> Would it be too hard to have the compiler automatically mark "obvious
> data" as non-scannable?
>
> I mean, stuff gotten from streams or files should never contain pointers
> anyhow. Likewise, the compiler _should_ know whether a large array
> contains pointers or not. If not, then the entire array might be marked
> as non-scannable.
>
> Doing this non-pedantically might gain much speed in GC, without making
> the program itself much slower. In other words, the compiler should not
> bother with _every_ item known not to contain pointers, because this
> would result in a long list of scan/no-scan areas for the GC. But if
> there was a "lower size" or something like it, then this might actually
> work as intended.
I think someone actually wrote a GC patch a while back that did this, so
it's definitely possible with D as-is. I would like to see this done in
Phobos before 1.0, and it's on my mental to-do list for Ares as well.
Sean
More information about the Digitalmars-d
mailing list