[concurrency-interest] RentrantLock performance vs. AtomicInt

Chris Purcell chris.purcell.39 at gmail.com
Sat Feb 4 17:11:11 EST 2006


> I'm having trouble groking why ReentrantLock is so much faster than 
> the Atomic objects as the number of threads increase.

Maybe try adding exponential backoff to those threads that fail their 
CASes, and see if performance improves? You'll probably need to tune it 
a bit.

Chris



More information about the Concurrency-interest mailing list