so it turns out that knuth hash is the same as not hashing at all. Because the input is a random number from a fixed range, and I'm getting the hash index by masking the lower bits nothing much is going to improve the distribution.
My recommendation to people is usually that if you can afford AESNI, try doing basically this routine but with only 2 aesdecs, and test the histogram for your data. If it's "good enough", then you're done. If it's not, add two more (like the routine given), and THEN you're done.
-
-
2 aesdecs is 8 cycles, but they overlap with everything else, too. So if you are doing something like just hashing a pointer, you can mov it into an xmm register, do the two aesdecs, and they _should_ overlap with other things you were doing if there's anything else to do.
-
So it can be _extremely_ efficient, almost negligible, and you get very good bit distribution.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.