[Patches] GC infrastructure patch 1 (tp_recurse, tp_clear)
M.-A. Lemburg
mal@lemburg.com
Fri, 16 Jun 2000 10:09:01 +0200
Neil Schemenauer wrote:
>
> On Thu, Jun 15, 2000 at 11:50:00PM +0200, M.-A. Lemburg wrote:
> > Hmm, I guess we'd need to add some more free lists for
> > small containers then...
>
> I don't think this will help the GC too much. Currently I remove
> tuples from the GC set when they are placed on the free list. My
> thinking was that setting the pointers to NULL would be more
> expensive than removing the object from the set. Another
> advantage is that the collector doesn't have to look at objects
> on the free list. However, more free lists might help offset the
> cost of the GC.
Uhm, I was referring to the memory costs of those 3 additional
words needed for every GC aware object, not so much the
performance costs. You usually have many small containers
and a few big ones. For the big ones those extra words don't
matter much, but for the small ones the increase in size
may well be noticable, e.g. say you store a database table
in a list of small lists.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/