- MurmurHash
-
MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup.[1][2][3] It was created by Austin Appleby in 2008,[4][5] and exists in a number of variants[6], all of which have been released into the public domain.
Contents
Variants
The current version is MurmurHash3, which yields a 32-bit or 128-bit hash value and is optimized for Intel processors.
The older MurmurHash2 yields a 32-bit or 64-bit value. Slower versions of MurmurHash2 are available for big-endian and aligned-only machines. The MurmurHash2A variant adds the Merkle-Damgard construction so that it can be called incrementally. There are two variants which generate 64-bit values; MurmurHash64A, which is optimized for 64-bit processors, and MurmurHash64B, for 32-bit ones. MurmurHash2-160 generates the 160-bit hash, and MurmurHash1 is obsolete.
Implementations
The canonical implementations are in C++, but there are efficient ports for a variety of popular languages, including Python,[7] C#,[8] Perl,[9] Ruby[10], PHP[11], Haskell,[12] Java,[13] and JavaScript.[14][15]
It has been adopted into a number of open-source projects, most notably libstdc++ (ver 4.6), nginx (ver 1.0.1)[16], libmemcached[17] (the C driver for Memcached), maatkit,[18], Hadoop.[1], Kyoto Cabinet[19], RaptorDB[20] and Scala[21].
References
- ^ a b Hadoop in Java
- ^ Chouza et al.
- ^ Couceiro et al.
- ^ MurmurHash on GooglePages
- ^ MurmurHash first announcement
- ^ MurmurHash2-160
- ^ pyfasthash in Python
- ^ Davy Landman in C#
- ^ Toru Maesaka in Perl
- ^ Ruby
- ^ Murmurhash3 PHP extension
- ^ Haskell
- ^ Derek Young in Java, public domain
- ^ Javascript implementation by Ray Morgan
- ^ MurmurHash.js by Gary Court
- ^ nginx
- ^ libmemcached
- ^ maatkit
- ^ Kyoto Cabinet specification
- ^ RaptorDB CodeProject page
- ^ Scala compiler implementation
See also
- Fowler–Noll–Vo hash function
- Jenkins hash function
Categories:- Hash functions
Wikimedia Foundation. 2010.