On 07/04/2016 02:37, Emilio G. Cota wrote: > I take this back. I don't know anymore what I measured earlier today--it's > been a long day and was juggling quite a few things. > > I essentially see the same chain lengths (within 0.2%) for either function, > i.e. > func3 or func5 with the padded 0's when running arm-softmmu. So this > is good news :>
It's also much more reasonable for a good hash function .:) >> Perhaps better is to always use a three-word xxhash, but pick the 64-bit >> version if any of phys_pc and pc are 64-bits. The unrolling would be >> very effective, and the performance penalty not too important (64-bit on >> 32-bit is very slow anyway). > > By "the 64-bit version" you mean what I called func5? That is: > > if (sizeof(phys_pc) == sizeof(uint64_t) || sizeof(pc) == sizeof(uint64_t)) > return tb_hash_func5(); > return tb_hash_func3(); > > or do you mean xxhash64 (which I did not include in my patchset)? I meant xxhash64, but using func5 unconditionally is by far my preferred choice. Paolo