performance surprise with Object.hashCode()

Vitaly Davidovich vitalyd at
Mon May 13 13:37:00 PDT 2013

OK so you're talking about the inline cache then, which I thought wasn't
being emitted; I didn't see it in my asm output but I didn't disable
intrinsic, so maybe that's why.  OK yeah, that makes sense.

Sent from my phone
On May 13, 2013 4:31 PM, "Aleksey Shipilev" <aleksey.shipilev at>

> 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.
> -Aleksey.
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-compiler-dev mailing list