performance surprise with Object.hashCode()
aleksey.shipilev at oracle.com
Mon May 13 12:51:01 PDT 2013
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.
More information about the hotspot-compiler-dev