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

You want the opposite behavior in order to be cache friendly, an RC system where the counts are stored next to the object.


Not necessarily. The issue is that releasing a reference at the top of a tree of objects has the potential to walk a large graph of objects (doing downcounts at each) that are not in cache, causing some thrash.

In an ideal world and in a program running with a not-huge # of objects you could keep the entire basket of reference counts in L1 cache, separate from the objects. Then decrements would be potentially cheap. A bit utopian though.




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

Search: