From 4bfa758bf5996757e0f5894ab7a04d82ae016888 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 22 Dec 2009 13:26:47 -0800 Subject: [PATCH] hash: use native appropriately sized hash for word, not native host word size These shouldn't be used over the wire or on disk, but just in case. Also, i suspect the 64-bit hash is probably faster than the 32bit one twice? --- src/include/hash.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/include/hash.h b/src/include/hash.h index 2a75ecd907f95..bb1499cada46b 100644 --- a/src/include/hash.h +++ b/src/include/hash.h @@ -47,21 +47,13 @@ inline uint32_t rjhash32(uint32_t a) { template<> struct rjhash { inline size_t operator()(const uint32_t x) const { -#ifdef __LP64__ - return rjhash64(x); -#else return rjhash32(x); -#endif } }; template<> struct rjhash { inline size_t operator()(const uint64_t x) const { -#ifdef __LP64__ return rjhash64(x); -#else - return rjhash32(x) ^ rjhash32(x >> 32); -#endif } }; -- 2.39.5