|
Boost : |
From: Miro Jurisic (macdev_at_[hidden])
Date: 2005-04-08 16:07:06
In article <4256E629.5C47C47C_at_[hidden]>, Alexander Terekhov <terekhov_at_[hidden]>
wrote:
> Peter Dimov wrote:
>
> > It might be good enough anyway... it's only two more instructions,
> > after all. stwcx. is uncontended on zero.
>
> It is contended on strong count and uncontended on weak count. On MP,
> lock()ers will simply play Ping-Pong with zero fighting each other.
> Even if you change the code and do that silly "cleanup write" out of
> the loop, it will still increase traffic, I'm afraid. So, again, get
> rid of it unless the issue is provably real (not a myth created from
> miscommunication or whatever).
I think that given the choice of better performance and better safety we should
err on the side of safety until the faster version is provable safe, not the
other way around (as you seem to be suggesting).
meeroh
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk