commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [collections] MultiKeyMap
Date Sun, 11 Apr 2004 09:12:28 GMT
> Why do you we need this when we have MultiKeys available -- i.e., what do
> you gain by using multiple keys instead of a single MultiKey?  Sorry if I
> am being dense here, but I don't understand what disaggregation of the
> MultiKey is buying us.

Me not being clear. To use MultiKey as keys in the map has an overhead. For
every get/contains/remove you have to create a new MultiKey object which is
then thrown away once the operation is complete. This was a performance
hotspot in some recent testing I did.

With MultiKeyMap the get/containsKey/remove operations do not create the
temporary MultiKey object, they query the data directly. put still creates
the MultiKey as that is what is actually stored in the hashed map.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message