harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev" <aleksey.shipi...@gmail.com>
Subject Re: [classlib][luni][performance] IdentityHashMap implementation
Date Mon, 21 Apr 2008 17:08:57 GMT
So, the IdentityHashMap based on HashMap is available at HARMONY-5771.

This change gives +20% on MT/SerialBench and +80% on MT/ThreadLocalBench.
It also incorporates arithmetic improvements [2] because HashMap
implementation already have them.

Should we commit this code [1] and then merge the overlapping code in
AbstractMap?

Thanks,
Aleksey.

[1] https://issues.apache.org/jira/browse/HARMONY-5771
[2] https://issues.apache.org/jira/browse/HARMONY-5718

On Mon, Apr 21, 2008 at 4:50 PM, Aleksey Shipilev
<aleksey.shipilev@gmail.com> wrote:
> Tim,
>
>  I'm thinking now about making IdentityHashMap to be similar with
>  HashMap. AFAIK, there are spec problems with overriding of existing
>  HashMap implementation on equality operation, so I want to go this
>  way:
>   1. Copy-paste HashMap implementation to IdentityHashMap
>   2. Change the equality checks and hashCode() calls to
>  IdentityHashMap-specific ones
>   3. Merge the common code in AbstractMap to reduce code duplication.
>
>  Performance data can be available at (2), and no committing is
>  required on that step.
>
>  How this sounds?
>
>  Thanks,
>  Aleksey.
>
>
>
>  On Mon, Apr 21, 2008 at 4:45 PM, Tim Ellison <t.p.ellison@gmail.com> wrote:
>  > Alexey Varlamov wrote:
>  >
>  > > 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.
>  > >
>  >
>  >  Before committing to replace our current implementation, I'm interested to
>  > see some experiment and measurement of new ideas.  What could be done?
>  >
>  >  Regards,
>  >  Tim
>  >
>

Mime
View raw message