3 ms·
> Of course, in the latter case the "code" is just checking a single counter rather than doing fancy concurrent root-tracing, but the similarity is established,
by eru 3y ago
> Of course, in the latter case the "code" is just checking a single counter rather than doing fancy concurrent root-tracing, but the similarity is established, and the alternatives are clearly delineable: [...]
You also need to do some fancy tracing for reference counting, because when a big data structure 'dies', you need to trace it completely.
Of course, reference counting also pays the price of fiddling with its counters on every single read. So every read-only workload turns into a read-write workload.
Garbage collection has no such overhead until you start the collector. (Basically all the overhead is amortised.)