0

I'm writing a hash table implementation for myself in C. I will either be using perfect hashing or Cuckoo hashing, I haven't decided yet.

However, I'm no expert in hash functions / families. As I'll be mapping unsigned 32 bit integers to unsigned 32 bit integers, can anyone recommend to me which functions might serve me best and where to find C implementations of them?

I'm optimizing on performance.

Thanks!

lollercoaster
  • 15,969
  • 35
  • 115
  • 173

1 Answers1

1

Bob Jenkins has published code for generating int->int perfect hashes and placed it into the public domain. It is the only ready-made tool I know of that deals with integer to integer hashing. Other hash generation tools/libraries such as gperf or CMPH want to deal with strings.

LogicG8
  • 1,767
  • 16
  • 26
  • very cool. though as I stated above I'm writing my own, so I'm more interested in which types of hash functions are best. – lollercoaster Jul 29 '13 at 12:25