Re: Hash tables
From: Måns Rullgård (mru_at_inprovide.com)
Date: 03/29/05
- Next message: Chuck Dillon: "Re: Using make"
- Previous message: Russell Shaw: "Hash tables"
- In reply to: Russell Shaw: "Hash tables"
- Next in thread: Fletcher Glenn: "Re: Hash tables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Mar 2005 19:38:05 +0200
Russell Shaw <rjshawN_o@s_pam.netspace.net.au> writes:
> Hi,
>
> I made a hash table that usually holds less than 1000 entries, and the
> keys are text strings of 5-10 characters.
>
> Would a decent hash function be to just generate a 10 bit remainder
> by feeding the text into a 10 bit shift register which does a crc
> long division on it, then using that to index a 1024 entry array?
> (i'll use a maximal length generator polynomial)
I'm not sure how that would perform, but the well-known Jenkins' [1]
hash function is usually a good choice. It's in the public domain, to
top it off.
1. http://burtleburtle.net/bob/hash/doobs.html
-- Måns Rullgård mru@inprovide.com
- Next message: Chuck Dillon: "Re: Using make"
- Previous message: Russell Shaw: "Hash tables"
- In reply to: Russell Shaw: "Hash tables"
- Next in thread: Fletcher Glenn: "Re: Hash tables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|