performance surprise with Object.hashCode()

Aleksey Shipilev aleksey.shipilev at
Mon May 13 13:31:01 PDT 2013

On 05/14/2013 12:27 AM, Vitaly Davidovich wrote:
> Why would o_i without intrinsic need a typecheck? Every object has
> hashCode, it should be just a vcall.  

You do the typecheck to check it is indeed Integer, and call
Integer.hashCode() directly. *Avoiding* the vcall is what makes both i_i
and o_i (without intrinsic) faster.


More information about the hotspot-compiler-dev mailing list