> How do the following attribute of a hash key: > size (something like an alphanumeric > string about 70 chars wide)
Longer strings take longer to hash, but 70 characters isn't massive. Hashing a string takes time proportional to the length of the string. > similarity (groups of about 30% of the keys are > similar for the 1st n-10 characters) Good hash algorithms perform well with similar keys... sequences are common. > affect the performance of: > key listings (things like grep /pattern/, keys %hash) Grep can be slow, especially with patterns. Keys could be slow, especially if the dataset is large. > key lookups (referencing $hash{$key}) Key lookups are done in O(log N), which is pretty nippy even with large datasets. If you have performance issues, why not whittle down the problem to a small code section that the list can play with? I suspect changing the grep pattern will help enormously. Jonathan Paton __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]