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

"With reference counting, objects are recognized as obsolete due to their reference counts dropping to zero. Deallocation of these objects leads to transitive deallocations of other objects because of their reference counts transitively dropping to zero. Since this is an inherently sequential process, this leads to a similar significant pause as with a stop-the-world garbage collector."

There are three primary performance penalties for reference counting:

1. This, where dropping one link causes a deallocation chain.

2. A typical heap implementation will leave live objects scattered throughout memory, leading to cache issues.

3. Maintaining the reference counts may cause writes to memory, leading to other cache issues, plus atomicity.




People often forget that memory allocation is very expensive; the C/C++ default allocator is very inefficient.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: