A smaller GC benchmark

John Demme me at teqdruid.com
Mon Dec 10 15:44:04 PST 2007


Robert Fraser wrote:

> Vladimir Panteleev wrote:
>> On Mon, 10 Dec 2007 22:48:00 +0200, Robert Fraser
>> <fraserofthenight at gmail.com> wrote:
>> 
>>> FWIW, I don't think non-moving GCs will ever be able to outperform a
>>> well-tuned generational collector. But I'm not exactly in the know about
>>> these things, so I may be wrong.
>> 
>> I'm not sure if generational collectors are moving GCs, but since you're
>> comparing them to non-moving GCs I'll add that a moving GC needs full
>> knowledge of type information to work properly. While confusing an
>> integer for a pointer may be a forgiveable mistake for non-moving GCs,
>> it's not for a moving GC. I think D isn't ready for that yet (especially
>> considered that both Phobos and Tango maintainers/users insist on void[]
>> being a type that's allowed to hold pointers).
>> 
> 
> How would you make a non-moving generational GC? Isn't the idea of the
> generational GC that long-lived objects are moved into a separate part
> of memory?

I don't believe so.  According to the all-knowing Wikipedia entry on GCs,
generational GCs are frequently implemented by using difference sections of
memory for each generation.  However, this doesn't seem to be necessary. 
The only things that "generational" GC implies is that memory chunks are
lumped into difference categories according to age- the older ones are
scanned less often.  Cross-generational references have to be given special
attention, however.  I could see a D GC being generational yet non-moving
by storing a generation marker at the begining of a memory chunk or some
such such scheme instead of partitioning memory by age.

IANA GC expert, however, so please correct me if I'm wrong.

-- 
~John Demme
me at teqdruid.com



More information about the Digitalmars-d mailing list