harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov" <alexey.v.varla...@gmail.com>
Subject Re: [classlib][luni][performance] IdentityHashMap implementation
Date Mon, 21 Apr 2008 06:27:54 GMT
2008/4/21, Aleksey Shipilev <aleksey.shipilev@gmail.com>:
> Well, the implementation note is what confusing me.
> Can we ignore it and implement our own IdentityHashMap instead of
> open-addressed + linear probed + joint key/values array?

I believe so (given that we respect other spec requirements). The
implementation note is a hint, not a part of actual spec IMO.

>
> On Mon, Apr 21, 2008 at 8:50 AM, Alexey Varlamov
> <alexey.v.varlamov@gmail.com> wrote:
> >  Implementation note: This is a simple linear-probe hash table, as
> >  described for example in texts by Sedgewick and Knuth. The array
> >  alternates holding keys and values. (This has better locality for
> >  large tables than does using separate arrays.) For many JRE
> >  implementations and operation mixes, this class will yield better
> >  performance than HashMap (which uses chaining rather than
> >  linear-probing)."
>
> Thanks,
> Aleksey.
>

Mime
View raw message