Skip to content

Instantly share code, notes, and snippets.

@zeux

zeux/murmur.h

Last active Mar 20, 2021
Embed
What would you like to do?
MurMurHash finalizers as 32-bit integer/pointer hashers
uint32_t murmur2(uint32_t h)
{
h ^= h >> 13;
h *= 0x5bd1e995;
h ^= h >> 15;
return h;
}
uint32_t murmur3(uint32_t h)
{
h ^= h >> 16;
h *= 0x85ebca6bu;
h ^= h >> 13;
h *= 0xc2b2ae35u;
h ^= h >> 16;
return h;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment