Classes |
struct | hash32 |
Static Public Member Functions |
static uint32_t | compute32 (const void *key, size_t len, uint32_t seed) |
template<typename T > |
static uint32_t | compute32 (const T &key, uint32_t seed) |
static uint32_t | compute32 (const std::string &key, uint32_t seed) |
template<typename T > |
static uint32_t | compute32 (const std::vector< T > &key, uint32_t seed) |
Static Private Member Functions |
static uint32_t | fmix (uint32_t h) |
static uint32_t | getblock (const uint32_t *p, int i) |
static uint32_t | rotl32 (uint32_t x, int8_t r) |
Fast murmur3 hash implementation
This class implements the 32-bit murmur3 hash algorithm and is in fact derived from the original code:
https://github.com/PeterScott/murmur3
The main difference is that the template function compute32() can be more easily optimised by the compiler. Especially if you're hashing constant-size types (even more so if they're a multiple of 32 bits in size), the code will be significantly faster than the original implementation.
Definition at line 55 of file murmur3.hpp.