comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: hashing
Date: Mon, 06 May 2002 23:36:59 GMT
Date: 2002-05-06T23:36:59+00:00	[thread overview]
Message-ID: <3CD71397.E4A89C84@acm.org> (raw)
In-Reply-To: e1a50f2.0205061242.6c0b5dc@posting.google.com

Antonio Duran wrote:
> 
> "chris.danx" <chris.danx@ntlworld.com> wrote in message news:<1b2t8.507$na.19833@news8-gui.server.ntli.net>...
> > Hi,
> >
> > Does anyone have a good hash function for strings (length is arbitary,
> > number of buckets is determined when package is instantiated and collisions
> > are handled with chaining)?  I'm new to writing hash tables and functions
> > (used them in libs, but this has to be all my own work!), and have chosen
> > this technique to implement in an assignment -- had enough linked lists, and
> > want to expand my horizons.

You might want to look at P. K. Pearson, "Fast Hashing of
Variable-Length Text Strings," Comm. ACM, 1990 Jun. It's a fast "hashing
function specifically tailored to variable-length text strings."
"Similar strings are not likely to collide." It produces an unsigned
8-bit value for the hash.

An implementation is available as part of the PragmAda Reusable
Components, available from

http://home.earthlink.net/~jrcarter010/pragmarc.htm

and the mirror at www.adapower.com. Look for
PragmARC.Hash_Fast_Variable_Length.

-- 
Jeff Carter
"You empty-headed animal-food-trough wiper."
Monty Python & the Holy Grail



  reply	other threads:[~2002-05-06 23:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-10 21:31 hashing chris.danx
2002-04-10 21:24 ` hashing Steven Deller
2002-04-10 22:41   ` hashing Nick Williams
2002-04-10 23:36   ` hashing chris.danx
2002-04-11 14:18     ` hashing joevl
2002-04-15 15:32     ` hashing Ken Burtch
2002-04-11 23:18   ` hashing(HATs. A more efficient algorithm?) Wannabe h4x0r
2002-04-11 23:29     ` chris.danx
2002-04-12  7:24       ` Wannabe h4x0r
2002-04-12 15:00         ` Chad R. Meiners
2002-04-12 17:22         ` tmoran
2002-04-10 21:56 ` hashing Chad R. Meiners
2002-04-10 23:43 ` hashing Ted Dennison
2002-04-11 16:12 ` hashing Georg Bauhaus
2002-04-11 22:36 ` hashing Simon Wright
2002-05-03 10:16 ` hashing Antonio Duran
2002-05-05 13:55 ` hashing Robert Dewar
2002-05-06 20:42 ` hashing Antonio Duran
2002-05-06 23:36   ` Jeffrey Carter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-10 22:00 hashing Beard, Frank [Contractor]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox