ReentrantLock performance regression between JDK5 and 6/7?

Vitaly Davidovich vitalyd at
Thu Aug 11 10:13:50 PDT 2011

I tried this bench on 6u23 and if I first run that code in a 10k iteration
loop and then time the 1mm iteration loop I get about 10 ms speedup.  The
first loop would trigger jit compilation (10k is the default threshold I
believe) and second should run without compilation interruption.

Can you try the same? Also might be interesting to time it under the
interpreter (-Xint).
On Aug 11, 2011 11:38 AM, "Clemens Eisserer" <linuxhippy at> wrote:
> Hi Vitaly,
> Which OS are you using?
> Linux-3.0 (Fedora 15)
>> Also, you should use System.nanoTime() for this type of timing as it
>> you a more precise timer.
> I tried, but results remained the same. ~53ms for jdk6/7, ~41 for JDK5.
> I was using the server compiler both times.
> Thanks, Clemens
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-runtime-dev mailing list