<div class="gmail_quote">On Sun, Dec 4, 2011 at 4:12 PM, Howard Hinnant <span dir="ltr"><<a href="mailto:hhinnant@apple.com">hhinnant@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
</div>I've been convinced to use murmur2 when I need to combine 2, 3, or 4 size_t's into a single one, except for the case of long double on x86. My rationale is that long double patterns are not likely to accidentally occur often in a long double. So I'm sticking with xor for long double for now. If I see cases that could easily occur accidentally, this can always be changed in the future.<br>
<br>
I settled on murmur2 instead of murmur3 because of the easy availability of the 32 bit and 64 bit versions.</blockquote><div><br></div><div>I'm confused. What do you mean by 32-bit and 64-bit versions? If you could clarify what versions you would like, the author of the murmur hashes and some other folks here at google are offering to help build variants that target exactly what libc++ needs.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> I did not see a 64 bit murmur3, and figured murmur2 is good enough. murmur2 won't actually ever be used when size_t is 64 bits. It will only be activated for (unsigned) long long and double on 32 bit platforms.<br>
<br>
Oh, except that I activated murmur2 for basic_string as well.</blockquote><div><br></div><div>Why not murmur3 or city hash? murmur3 is both higher quality and significantly faster. city hash is still faster. For reference, the original thread was *primarily* focused on basic_string hashing.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The tests I ran weren't that convincing. However I also admit that there is a lot I don't know here, and people are asking for murmur. And what I had was operating a character at a time and murmur operates a word at a time. So done.</blockquote>
<div><br></div><div>At Google, we have found CityHash64 to provide very significant benefits when used to hash strings for unordered containers. If you look at the benchmark we posted (SMHasher) it was written specifically to showcase the problems hit by real-world hashing of string contents.</div>
</div>