David:

These are good examples, but they don't quite address what I mean. By
"naive reference counting" I mean adding the appropriate increments and
decrements on every reference load and store. I take it for granted that we
live in a concurrent world, so (absent careful thought and optimization)
all of those are interlocked operations.

The several (very clever) structural optimizations that you identify are
great, but they are not what I was trying to talk about. All I was really
trying to say is that reference counting doesn't make sense (from a
performance perspective) unless you apply some care and thought to how you
go about it.

There's actually a hidden pause in reference counting as well. *Decrementing
* a counter can cause a cascade of deallocations. While that cost can be
deferred, doing so hazards the main advantage of reference counting: rapid
recovery of free space.


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to