performance surprise with Object.hashCode()
Vitaly Davidovich
vitalyd at gmail.com
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 oracle.com>
wrote:
> 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...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130513/11de0906/attachment.html
More information about the hotspot-compiler-dev
mailing list