RFC: Adding a Hashable type class and HashMap/HashSet data types to HP

Thomas Schilling nominolo at googlemail.com
Thu Nov 25 13:35:41 EST 2010

On 25 November 2010 17:59, Yitzchak Gale <gale at sefer.org> wrote:
> Were you thinking that you could serialize those things and
> then just use murmurhash on them?

Pretty much, yes.

> Try it, but my guess is
> it won't work well. Murmurhash is designed for strings, not for
> those things. It's not a cryptographic hash; it's designed to
> have good statistical properties for a certain very specific types
> of input. If you abuse it, you'll likely lose those good properties.
> The parameters for murmerhash were tweaked using keys that
> were English words, and very short strings of random bytes.
> There is no evidence it will work well with other kinds of keys.

Where did you get this from?  The criteria listed at
<http://code.google.com/p/smhasher/wiki/SMHasher> all talk about
arbitrary bytes.  MurmurHash is designed for arbitrary byte strings,
not English words.  It is not a cryptographic hash, sure, but I can't
see any evidence that it only works with text.

/ Thomas
Push the envelope. Watch it bend.

More information about the Libraries mailing list