by codexon · 13y ago · 0 comments
How does Nimrod deal with the multi-thread reference counting performance problem?
Languages like Java don't use ref count and CPython has a global lock because multiple threads accessing a ref count mutex kills performance.
The difference between a DRC algorithm and a tracing algorithm is what needs to happen during the GC pause. A tracing collector has to trace all live objects (even a generational collector will trace all live objects eventually), in order to free any memory. A DRC collector just has to apply the deferred increments/decrements. Once those increments/decrements are applied, zero-count objects can be immediately deleted.