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

> - no sharing across threads, otherwise locking is required for refcount updates

If you are sharing across threads you will need a synchronization mechanism, whether you have reference counting or not.

So it's not exactly fair to assign this cost to reference counting.

General reference counting does make adding or removing a reference a read/write operation, though of course non-naive implementations don't do this at every turn. Not to mention tracing GC has a reference cost as well.



Tracing GCs don't need to synchronize at each access point.

One can optimize refcounting with deferred reference counting algorithms, but then that is already the skeleton implementation of a tracing GC.




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

Search: