(original) (raw)



On 9/13/07, Adam Olsen <rhamph@gmail.com> wrote:


Basically though, atomic incref/decref won't work.  Once you've got
two threads modifying the same location the costs skyrocket.  Even
without being properly atomic you'll get the same slowdown on x86

(who's cache coherency is fairly strict.)

 

I'm a bit skeptical of the actual costs of atomic incref. For there to
be contention, you would need to have to be modifying the same memory
location at the exact same time. That seems unlikely to ever happen. We
can't bank on it never happening, but an occasionally expensive
operation is ok. After all, it's occasional.


Justin