"Marcin 'Qrczak' Kowalczyk" <[EMAIL PROTECTED]> writes:
> It involves operations every time an object is merely passed around,
> as references to the object are created or destroyed.
And it does something when it frees an object. In some GCs there is
a cost associated with keeping an object alive, but there is no
per-object cost when a group of objects die.
Most objects die young. This is what I've measured myself. When my
compiler runs, the average lifetime of an object is about 1/5 GCs.
This means that 80% of objects have only an allocation cost, while
freeing is free. And with a generational GC most of others are copied
only once: major GCs are less frequent than minor GCs.
It is true that a given long-living object has a larger cost, but such
objects are a minority, and I believe this scheme pays off. Especially
if it was implemented better than I did it; this is the only GC I've
implemented so far, I'm sure that experienced people can tune it better.
--
__("< Marcin Kowalczyk
\__/ [EMAIL PROTECTED]
^^ http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com