Hi,
Currently we use HashMap as base implementation for ValueMap.
Since usually only few values are stored in ValueMap, i think it is a
bit overhead. I've made a simple implementation of map called SmallMap,
that uses array list for keys and another one for values.
The funny thing is, that when I use the SmallMap, serialized pagemaps
are even slightly bigger than HashMap. Because serialized hash map only
serialize keys and values, while I also serialize list length (twice).
Although this can be handled easily, just make own read/writeObject
implementation.
But I'd say that the runtime memory overhead of HashMap would be bigger
that SmallMap. Do you think we should change the map ValueMap is
extended from or leave it to be HashMap?
-Matej