[Haskell-cafe] Re: String Hashing

apfelmus apfelmus at quantentunnel.de
Mon Jun 18 03:42:20 EDT 2007


Thomas Conway wrote:
> I'm trying to figure out how to maximum performance out of one of my
> inner loops which involves string hashing.
> 
> Consider the following hash function, which is a transliteration of a
> good one written in C:

Do you need the hash function for a hash table or for
fingerprints/signatures? In the former case, Tries are a much better
choice. For launching your own trie, see also

  Ralf Hinze. Generalizing generalized tries. Journal of Functional
  Programming, 10(4):327-351, July 2000
  http://www.informatik.uni-bonn.de/~ralf/publications/GGTries.ps.gz

Currently, there's no standard Data.Trie library but it's already under
consideration

  http://hackage.haskell.org/trac/ghc/ticket/721

Regards,
apfelmus



More information about the Haskell-Cafe mailing list