On Wed, Apr 27, 2016 at 9:00 PM, Stefan Karpinski <
ste...@karpinski.org> wrote:
> Performance. If you want to be as fast as C, reference counting doesn't cut
> it.
With slightly more detail: RC has relatively low latency but also has
a low throughput. The issue is that RC adds a lot of overhead to
common operations like stack and heap store. (You naively need an
atomic increment and an atomic decrement per store, which is a huge
cost).
Of course there are ways to optimize this. What's interesting though
is that tracing collector sometime implement something similar to RC
(in the form of write barrier) in order to minimize latency and good
RC system implement optimizations that are very similar to tracing
collector (effectively delaying RC and do it in batch) in order to
improve throughput and handle cyclic reference.