System.identityHashCode

John Rose john.r.rose at oracle.com
Fri May 8 23:31:51 UTC 2020


That’s a lame but correct implementation.  Making it higher quality will require some effort. An ideal implementation would make every bit of the output depend on every bit of the input that could affect the outcome of the acmp bytecode. And it would be fast. Therefore we have trade-offs to make.

> On May 8, 2020, at 3:56 PM, Remi Forax <forax at univ-mlv.fr> wrote:
> 
> Hi all,
> it seems to me that for the current implementation the value returned by identityHashCode doesn't depend on the field values on the inlining classes but only the class.
> 
> What is the rational for such choice (if i'm right) ?
> 
> regards,
> Rémi



More information about the valhalla-dev mailing list