Neil Schemenauer wrote: > I believe that's correct. A state of the art generational GC would > outperform reference counting, even given Python's enormous > allocation rate.
Another thing to consider is that Python's current scheme tends to be more fail-safe when interacting with other systems that don't know about the GC scheme it's using. Most GC systems work by assuming that something is garbage unless the system can prove that it's not. This relies critically on being able to find all roots that could possibly lead to an object. Miss one anywhere and you get a very nasty crash when something is deallocated prematurely. Python's cyclic GC, on the other hand, assumes that nothing is garbage unless it can prove that it is. So if there's an object around somewhere that it can't reach, it might leak some memory, but it won't lead to a crash. This is a nice property to have in something like Python where interfacing with external code is so important. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com