nmdb: Change the cache hash function to Austin Appleby's MurmurHash2
commitcf06a74bd037a5255728b72da75e0e4e4f2bad69
authorAlberto Bertogli <albertito@blitiri.com.ar>
Thu, 15 Apr 2010 21:13:23 +0000 (15 18:13 -0300)
committerAlberto Bertogli <albertito@blitiri.com.ar>
Thu, 15 Apr 2010 22:12:36 +0000 (15 19:12 -0300)
tree2f4128772789a176e7672cf11a5a43cf68ecbde6
parent8b4ab9201633c17412bd96cabb5c25c311489628
nmdb: Change the cache hash function to Austin Appleby's MurmurHash2

After testing several hash functions, the one used in the cache was
changed to Austin Appleby's MurmurHash2.

MurmurHash2 is much faster than the one we use (10-25% in our benchmarks),
has nice and clean code, and is in the public domain.

We keep the old Jenkins' one-at-a-time function, and also add FNV and
Paul Hsieh's SuperFastHash, so the tests can be redone in the future if
needed.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
nmdb/cache.c
nmdb/hash.h [new file with mode: 0644]