[15] RFR (xs) 8046362 IdentityHashMap.hash comments should be clarified

Martin Buchholz martinrb at google.com
Thu Feb 6 17:31:21 UTC 2020


lgtm

Knuth didn't like linear probing, but memory locality became far more
important over time, favoring linear probing.

I don't get what hash() is doing with the low bits. Maybe we want something
like mix32.

On Thu, Feb 6, 2020 at 1:01 AM Andrew Haley <aph at redhat.com> wrote:

> On 1/28/20 11:41 PM, Stuart Marks wrote:
>
> > As an aside, I don't know whether the linear-probing (open
> > addressed) arrangement of IdentityHashMap is in fact faster than the
> > separate chaining approach of HashMap. Perhaps investigating that
> > could be a side project for someone.
>
> It always has been better in the past, but maybe if the collision rate
> is kept low it won't matter much. Deletion is horrible, though.
>
> > Changeset appended below.
> >
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8046362
>
> OK, thanks.
>
> --
> Andrew Haley  (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>
>


More information about the core-libs-dev mailing list