Permalink
Browse files

Document benchmarked hashes.

  • Loading branch information...
1 parent 98315e9 commit 80a3ad627ff0a038257bc814fcae718284da5372 @bos committed Oct 13, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 benchmarks/cbits/inthash.c
@@ -1,5 +1,9 @@
#include <stdint.h>
+/*
+ * 32- and 64-bit hashes by Thomas Wang.
+ */
+
uint32_t hash_wang_32(uint32_t a)
{
a = (a ^ 61) ^ (a >> 16);
@@ -22,6 +26,10 @@ uint64_t hash_wang_64(uint64_t key)
return key;
}
+/*
+ * 32-bit hashes by Bob Jenkins.
+ */
+
uint32_t hash_jenkins_32a(uint32_t a)
{
a = (a+0x7ed55d16) + (a<<12);

0 comments on commit 80a3ad6

Please sign in to comment.