Queue cleanup

Paul Rubin no.email at nospam.invalid
Mon Aug 30 02:56:03 CEST 2010


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> I could be wrong, but how can they not be subject to the same performance 
> issue? If you have twenty thousand components that all have to be freed, 
> they all have to be freed whether you do it when the last reference is 
> cleared, or six seconds later when the gc does a sweep.

GC's on large machines these days do not sweep at all.  They copy the
live data to a new heap, then release the old heap.  Because there is
usually more garbage than live data, copying GC's that never touch the
garbage are usually faster than any scheme involving freeing unused
objects one by one.



More information about the Python-list mailing list