On Tue, Dec 8, 2009 at 2:35 PM, Russ Cox <r...@swtch.com> wrote: >> because it's not a Ref. unfortunately, if it were >> a Ref, it would be much faster. _xinc is deadly >> slow even if there is no contention on x86. > > do you have numbers to back up this claim? >
I don't have the code or the numbers in front of me, but I recall seeing quite a bit of speed improvement when I experimentally replaced incref/decref with direct calls to _xinc/_xdec. I don't remember what the test was, but I do remember that I got something like 35% improvement on it. I ran that kernel on my terminal for the rest of the summer without trouble; while I didn't notice a blazing speed increase, it didn't slow me down either. John -- "Object-oriented design is the roman numerals of computing" -- Rob Pike