Modifying the Python object model
Modifying the Python object model
Posted May 16, 2018 23:17 UTC (Wed) by roc (subscriber, #30627)Parent article: Modifying the Python object model
This is counter-intuitive. Generally speaking, reference counting has better data-cache locality than tracing GC, because you normally read or write an object's reference count around the same time as you touch the object for other reasons, whereas tracing GC must periodically scan all live objects whether they have recently been used or not.
Compacting or generational GC can improve locality by improving the compactness of allocations, but I would be surprised if Instagram was able to fit that into CPython.
So I wonder what's behind this statement.
