> From: Carsten Ziegeler [mailto:[EMAIL PROTECTED]] > > There are two things you need to know about the default > hashCode() for > > this to work: > > > > 1) Default hash values are the address of the object--meaning that > > they are all aligned on a power of 2 ( typically every 4 or 8 > > bytes depending on 32 or 64 bit machines ). > > > > 2) Very regular hash values (like the default) will heavily weight > > themselves to a particular buckets in the hash table (I > found this > > out creating the new BucketMap in Avalon collections). > > > > 3) You must ensure that the resultant hashCode is not an > even number, > > this will help ensure a more even distribution of > hashvalues. (this > > is what the String hashCode tries to do). > > > > 4) The hashing algorithm must be quick--but it can be cashed for a > > quick access. That way if multiple tests on the hashCode occur, > > you can save an expensive recalculation phase for each code. > > > You are a little bit behind this thread ;) > > Volker and I discussed some of this already. The only thing > which might need some improvements is the implementation of > the hashCode() methods in the ComponentCacheKey and the > PipelineCacheKey implementations :)
Maybe so, but those things do need to be kept in mind. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]