Optimizing hash table lookup in symbol binding
Szabolcs Nagy
Szabolcs.Nagy@arm.com
Tue Nov 19 09:15:00 GMT 2019
On 18/11/2019 21:57, Wilco Dijkstra wrote:
> Hi Florian,
>
> Hashtables should be powers of 2 - this not only gives very efficient
this hash table is in the elf binary,
so we are not in control of the size and other details.
> lookups but also enables double hashing without ever needing to use
> multiply or division. If you're worried about the entropy of the low bits
> you can do (x ^ (x >> 16)) & mask to mix bits before masking.
>
> If you're looking to get the best possible speedup, this will do it.
>
> Cheers,
> Wilco
>
More information about the Libc-alpha
mailing list