Re: hash question

Thomas Schürger <[email protected]>
Newsgroups gmane.mail.spam.spamprobe.general
Message-ID <[email protected]>
> Asking for opinions: if I switched from a 32 bit hash value as the 
> record key to using a 64 bit key or even a digest then I could reduce or 
> eliminate the "lossy" nature of the hash format at the expense of a 
> larger data file.
> 
> If I used a 64 bit hash key the record size would increase from 12 to 16 
> bytes (a 33% increase).  Not sure what the loss rate would be with a 64 
> bit hash.
> 
> If I used a digest (128 bit MD5 hash) the record size would double to 24 
> bytes but losses would be virtually eliminated.  Computing an MD5 for 
> each term would probably be significantly slower than either 32 or 64 
> hash as well.

Using a 64 bit hash key sounds reasonable (in relation to the numer of
unhashed keys to store). More important would be the use of a good
hash function which minimizes collisions. Something like taking the
first 64 bits from the MD5, SHA-1 or RIPEMD160 hashs could be a good
choice.


Greetings,
Thomas.


-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.