[concurrency-interest] Question: microbenchmarks sourcecodes

Krzysiek Zaporowski krzysiek.zaporowski at googlemail.com
Sat Nov 24 17:00:32 EST 2007


Hi,
I'm making microbenchmark that measures ReentrantLock vs synchronized.
I've followed advices Brian Goetz presents in his articles, but still
I'm receiving strange results - synchronized block seems to be preety
faster. So, now I'm in the point where I don't know what to correct in
my benchmark to run it properly. Conceptually it's pretty similar to
benchmark proposed by Brian Goetz and Tim Peierls - threads are
receiving random numbers in synchronized or lock block.
Are there any sourcecodes of microbenchmark proposed? Or maybe someone
had done such benchmarks and could show me how to do this properly?

Regards,
Krzysiek


More information about the Concurrency-interest mailing list