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] Improvements in Collections
Date Fri, 18 Apr 2008 16:51:43 GMT
Nathan,

I think we have a sort of misunderstanding here. I'm not rounding to
2000, rather I round to next power of 2. I'm pushing the idea that
this optimization is general because it moves long-latency modulo (%)
operations to really cheap mask (&), but to guarantee this, we should
guarantee the storage is 2^k, where k is 0..N.

Thanks,
Aleksey.

On Fri, Apr 18, 2008 at 8:44 PM, Nathan Beyer <ndbeyer@apache.org> wrote:
>  I'm sure this optimization shows an improvement in the serialization use
>  case, but you'd be hard pressed to say that this improvement will make 80%
>  of all uses of HashMap, WeakHashMap and IdentityHashMap better. If you want
>  to round to 2000 to improve serialization, then do that in the
>  serialization.
>
>  I don't think this should be applied as is.
>
>  -Nathan
>

Mime
View raw message