Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Hash??? What ARE the latest hot-shot methods?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Bernstein  
View profile  
 More options Dec 5 1990, 5:52 pm
Newsgroups: comp.lang.c
From: brns...@kramden.acf.nyu.edu (Dan Bernstein)
Date: 5 Dec 90 00:37:28 GMT
Local: Tues, Dec 4 1990 7:37 pm
Subject: Re: Hash??? What ARE the latest hot-shot methods?
In article <1990Dec4.142017.12...@batcomputer.tn.cornell.edu> ly...@batcomputer.tn.cornell.edu (Tim Lynch) writes:

> Thanks for the reference.  Can someone recommend a book that does go into
> all the latest "hot-shot" methods?

Have there been any fundamentally new hashing methods in the last twenty
years? The only one I know of is Pearson's.

What are you really looking for? There are lots of string functions that
are both fast and, in practice, better than random hashing. These days I
start from h = 5381, and set h = h << 5 + h + c mod any power of 2 for
each new character c. Apparently Chris Torek prefers a multiplier of 31:
h << 5 - h + c. These are reliable and extremely fast. You can make them
even faster if you want to hash an entire string at once: just
precompute powers of 31 or 33, etc.

---Dan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.