3 ms·
MurmurHash2, which is pretty great, has some issues: "MurmurHash2_x86_64 computes two 32-bit results in parallel and mixes them at the end, which is fast but m
by MichaelGG 14y ago
MurmurHash2, which is pretty great, has some issues:
"MurmurHash2_x86_64 computes two 32-bit results in parallel and mixes them at the end, which is fast but means that collision resistance is only as good as a 32-bit hash. I suggest avoiding this variant."[1]
Murmurhash3 has a 128-bit variant, which might be more along the lines of what he's looking for (the original post mentions SHA256).
1: http://code.google.com/p/smhasher/wiki/MurmurHash3 http://code.google.com/p/smhasher/wiki/MurmurHash3
- martincmartin 14y agoComputing two 32-bit results in parallel and mixing them at the end does NOT mean collision resistance is only as good as a 32-bit hash. For that, you need to compute ONE 32-bit result, then transform it into a 64-bit result.
- finnw 14y agoDepends whether the two 32-bit hashes are correlated with each other. If there is no correlation then a pair of 32-bit hashes is no more likely to collide than a single 64-bit hash. But this is difficult to achieve, and you should not assume (for example) running the same algorithm twice with different initial states will produce uncorrelated hashes.
- martincmartin 14y agoVery true.
- ecaron 14y agoI thought Google's CityHash - http://code.google.com/p/cityhash/source/browse/trunk/README http://code.google.com/p/cityhash/source/browse/trunk/README - was their successor to the MurmurHash variants.
- spullara 14y agoCityHash doesn't have a 32-bit variant to participate in the benchmark. http://code.google.com/p/cityhash/issues/detail?id=2 http://code.google.com/p/cityhash/issues/detail?id=2