performance surprise with Object.hashCode()
Vitaly Davidovich
vitalyd at gmail.com
Mon May 13 13:00:39 PDT 2013
I'm comparing i_i vs o_i difference when intrinsic is enabled/disabled.
Based on your results, when intrinsic is disabled the o_i case is
marginally slower than i_i, whereas it's noticeably slower otherwise.
Sent from my phone
On May 13, 2013 3:51 PM, "Aleksey Shipilev" <aleksey.shipilev at oracle.com>
wrote:
> On 05/13/2013 11:28 PM, Vitaly Davidovich wrote:
> > Interesting, I didn't know about the DisableIntrinsic flag. I think the
> > o_i takes a hit because the hashCode there is so trivial that the guards
> > themselves cost more in pure overhead.
>
> I have no idea how can you reach this conclusion. The disassembly shows
> structurally the same code for o_o and o_i, but o_o takes the fast-path
> there, and o_i needs to resort to slow path. The checks are happening
> anyway in both cases.
>
> -Aleksey.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130513/b3d8e6b1/attachment.html
More information about the hotspot-compiler-dev
mailing list