performance surprise with Object.hashCode()
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>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev