4 ms·
> That means consistent latency Does it? Based on my admittedly limited knowledge of refcounting, either freeing an object can take an non-predictable amount
by ehaliewicz2 7y ago
> That means consistent latency
Does it? Based on my admittedly limited knowledge of refcounting, either freeing an object can take an non-predictable amount of time (decrementing the reference counters of all the objects pointed to by a freed object), or allocating new memory can take a non-predictable amount of time (by lazily deferring the above mentioned decrements until that memory is needed upon allocation).
- ghusbands 7y agoThe amount of effort required when a refcount reaches zero is unpredictable in general, yes, but at any particular site, the shape and lifetime of objects tend to follow a pattern. So if a particular bit of code drops a refcount to zero and takes a long time deallocating objects, it will with high probability always do so and is hence still fairly predictable/consistent.