Boost logo

Boost :

From: Dan (dan_at_[hidden])
Date: 2004-07-07 13:56:10

Just a note on the lightweight mutex for windows OS using Interlocked

I had one like this before (came with doug lee's allocator) and I ran some
benchmarks and saw a ~10% improvement in performance in a non-contention
situation. Now that benchmark may or may not have been valid, it's too long
ago for me to say with certainty, but it raises the question, what are the
numbers here?

Also one does not need to use a spin lock on a ref counted implementation. A
much faster (and safer) way to do that is just using InterlockedIncrement
and InterlockedDecrement when changing the ref count. I beleive this is what
most popular ref counting implementations use.

Boost list run by bdawes at, gregod at, cpdaniel at, john at