Subj : Re: What is the real costs of LOCK on x86 multiprocesor machine? To : comp.programming.threads From : Mirek Fidler Date : Sun Jul 31 2005 02:51 pm Joe Seigh wrote: > Peter Dimov wrote: > >> Mirek Fidler wrote: >> >>>> In practice, the actual amortized cost appears to be much lower than >>>> 50-100x. I see a 4x difference on shared_ptr_timing_test (which >>>> basically tests reference count increments and decrements in a somewhat >>>> real-life worst case scenario.) >>> >>> >>> Have you tested on real MP machine? (4x is close to what I have measured >>> on my SP). >> >> >> >> No, it was a single P4/2GHz without HT. >> > > Now that a lot of people have weighed in on this, why does the cost of > atomic increment/decrement matter? > A lot. It is decisive factor in choosing COW structure over full copy. Mirek .