Steven D'Aprano <st...@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. -- http://mail.python.org/mailman/listinfo/python-list