Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That "works" (minus circular references) in simple cases, but it still has bad worst case performance (if your decrements chain, causing many decrements and frees).

And in something like boost::smart_ptr, the cache performance is awful because the increment/decrement is an extra indirection in a separate allocation, which is getting hit constantly.




Actually, general malloc performance is horrible and that refcounting implimentation will be the absolute worst. In an accurate GC, the objects can be moved around in memory for more efficient allocation. Add support for generations and it becomes significantly faster than manual allocation. However, refcounting misses all of that and screws up on circular referrences to boot.


"Actually," normally starts a disagreement, but AFAICT, you restated what I said and agree. Or do I misunderstand?


Sorry, you are right. It's my bad grammer getting to me again.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: