Re: Efficient Text File Copy
From: CBFalconer (cbfalconer_at_yahoo.com)
Date: Sat, 31 Jan 2004 11:05:51 GMT
Richard Heathfield wrote:
... snip ...
> For a hashing algorithm, either use K&R's (p144!) or Chris Torek's
> (with the 33 multiplier rather than 31).
Why do you recommend this? I have used 31 and 37 in the past.
This is to hash strings consisting (in the main) of ascii chars.
Frankly I took Kernighan & Pikes word for it, also noting that 31
and 37 are prime, while 33 is not.
-- Chuck F (firstname.lastname@example.org) (email@example.com) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!