commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <...@apache.org>
Subject RE: [Commons-Avalon:collections] code integration
Date Thu, 20 Jun 2002 18:41:27 GMT
On Thu, 20 Jun 2002, Berin Loritsch wrote:
> > From: Michael A. Smith [mailto:mas@apache.org] 
> > 
> > I understand that Hashtable is synchronized. I didn't 
> > understand how it 
> > was relevant to the discussion at that point.
> 
> I guess I don't get the picture of how it is used in
> the approach that you outlined.
> 
> However, if we go the route of FixedSizeXXX and
> VariableSizeXXX then it really doesn't matter.  We can
> compare the cases where they are similar, and the
> cases where they excell.

Another way of looking at what I described is an array of hashtables 
(not java.util.Hashtable, but hashtable in the data structure sense of 
the word).  The hashcode for the object is used twice.  The 
first use determines which hashtable to use.  The second use 
is to determine where within that hashtable.  Like with 
bucket map, synchronization is only required for the second one.  

The main difference between BucketMap and what I am saying is that
you're using a linked list within each bucket, while I'm using a nested,
resizable hashtable.

If I can get my place cleaned up tonight faster than I planned (I'm 
having people in for the weekend), I'll throw together an 
implementation, and we can then compare the two implementations.  Do you 
have any benchmarking code written already?  

regards,
michael


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


Mime
View raw message