Hacker News new | past | comments | ask | show | jobs | submit login

> Even objects that never leave their creator thread will be likely to have their reference count incremented and decremented a few times over their life.

I think you're under the impression that there's only one refcount. The point of the original design (and this one) is that there are two refcounts: one that's updated only by the thread that created the object, and therefor doesn't need to use slow atomic accesses, and one that's updated atomically, and therefor can be adjusted by arbitrary threads.




Oh, I misunderstood you then. I thought you were trying to get rid of the local refcount and make the atomic one handle its job too, but what you're suggesting is a possible simplification of the logic that detects when it's time to destroy the object. That makes sense, just seems more minor than I thought you were going at and I guess I missed it.


I was also under the impression that the creator-thread-is-done-with-the-object bit was in a seperate word (TFA describes it as a "special" bit, but according to the paper[0] it's actually in the same word as the atomic refcount), and was trying to eliminate that.

0: https://sci-hub.se/https://dl.acm.org/doi/10.1145/3243176.32...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: