4 ms·
Thread-safe reference counting usually has lower throughput than tracing garbage collection. If it's throughput you're after, you're not going to get it with at
by pcwalton 12y ago
Thread-safe reference counting usually has lower throughput than tracing garbage collection. If it's throughput you're after, you're not going to get it with atomic reference counting.
- masklinn 12y agoOTOH refcounting has a more stable (and usually lower on average) memory usage, and no pauses (if cycles are ignored)
- Tuna-Fish 12y ago> and no pauses (if cycles are ignored) Actually, even without cycles the destruction time is in general unbounded. Just think what happens when you allocate a very long linked list one element at a time and then drop the head. With a bit of ill luck or intention, you can make each element be allocated from a different page with enough different pages so that they fall out of the TLB. In that situation, even without having pages written out to disk, you can expect each element to take ~ a thousand cycles to free. On a million element list, that's ~500ms for freeing the head.
- TheLoneWolfling 12y agoYou can do reference counting asynchronously, though.
- masklinn 12y agoThat specific issue exists in manual memory management schemes as well.