RFR (XS) CR 8058643: (str) Re-examine hashCode implementation

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Sep 17 16:43:58 UTC 2014


Hi Xueming,

On 09/17/2014 08:13 PM, Xueming Shen wrote:
> String.hashCode() has intrinsics,

No, we have no intrinsics for String.hashCode. We do have a native
implementation for VM internal purposes though, but it's irrelevant here.

> so I don't think  we are seeing the real performance "difference" of
> the implementations.

No, we are seeing the difference, but it is about consistently and
slightly different code generation, see the disassemblies linked in the
bug report. Really, the performance run was to look out for regressions,
and there is no indication there is one.

> My guess is the original one probably is faster.

No, it is not. Btw, that guess is inconsistent with a hypothesis we have
intrinsics for String.hashCode() ;)

Thanks,
-Aleksey.




More information about the core-libs-dev mailing list