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 <[EMAIL PROTECTED]> 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
>

Reply via email to