qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash
Date: Thu, 7 Apr 2016 10:46:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]