Brendan> Intuitively, given that the processor is much
    Brendan> faster than the bus, and you are just waiting for processor to
    Brendan> complete an addition or comparison before put the new memory
    Brendan> value on the bus...

I think in Python's case the reference count will often be in the
processor's local cache.  (Presumably, if the current thread is going to
Py_DECREF the object it's been working with the object's state recently.)
The stuff I read suggested that simply locking the local cache would be
significantly faster than having to lock the memory bus.

-- 
Skip Montanaro - s...@pobox.com - http://smontanaro.dyndns.org/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to