The analogy with a List implementation isn't a good argument to do this on hashmaps as lists don't use buckets and don't aim to reuse buckets.
What I mean is driving map allocation based on the size of a given list. Say you have a list of 12 things and want to allocate a map from name to "thing" for these 12. Then allocating the map with list.getSize() is most of the time not what you wanted. |