HashMap bug for large sizes
Kasper Nielsen
kasperni at gmail.com
Fri Jun 1 20:59:51 UTC 2012
On 01-06-2012 22:05, Eamonn McManus wrote:
>> But it is not just serializing a HashMap that does not work. HashMap.size()
>> and HashMap.clear() isn't working as well.
> I don't see what's wrong with HashMap.clear(),
My mistake, was looking at the HashMap implementation for Harmony.
> but HashMap.size() is
> clearly buggy and should be fixed. There's also a performance problem
> in that accesses start becoming linear once there are more than 1<<
> 30 entries, but fixing that is substantially harder than just fixing
> size(), and ConcurrentHashMap already provides a better alternative
> for such huge maps.
Yes, introducing an extra level of indirection a.la. CHM segments for
those few usecases is definitely not worth it.
- Kasper
More information about the core-libs-dev
mailing list