commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
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.

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message