Queue cleanup

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Fri Sep 3 19:31:26 EDT 2010


In message <7xmxs2uez1.fsf at ruckus.brouhaha.com>, Paul Rubin wrote:

> Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> writes:
>
>> Whereas garbage collection will happen at some indeterminate time long
>> after the last access to the object, when it very likely will no longer
>> be in the cache, and have to be brought back in just to be freed,
> 
> GC's for large systems generally don't free (or even examine) individual
> garbage objects.  They copy the live objects to a new contiguous heap
> without ever touching the garbage, and then they release the old heap.

And suddenly you’ve doubled the memory requirements. And on top of that, 
since you’re moving the valid objects into different memory, you’re forcing 
cache misses on all of them as well.

This is the continuing problem with garbage collection: all the attempts to 
make it cheaper just end up moving the costs somewhere else.



More information about the Python-list mailing list