On Sun, Oct 19, 2008 at 1:08 PM, Fons Adriaensen <fons(a)kokkinizita.net> wrote:
On Sun, Oct 19, 2008 at 12:36:55PM -0400, Paul Coccoli
wrote:
The only time you can get away without atomic ops
is on uni-processor.
Please cite a reference that says otherwise.
Plaese show us how using a non-atomic addition could go wrong.
On a side note, does anyone know what the performance penalty is (if
any) for using atomic ops?
And does it scale according to number of CPU cores? What other
factors are there? I assume the caching architecture makes a big
difference.
I've been using the atomic-ops library from HP for doing various
things lately, and I find it quite nice. But I have found myself
wondering whether I am paying some kind of penalty. Of course, I'm
sure it's less than the penalty for using locks.
Steve