mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-26 03:13:35 -05:00
When testing the pointer hash on 64-bit real pointers (map entries), it appeared that the shift by 33 bits that hoped to compensate for the 3 nul LSB degrades the hash, and the centering is more optimal on 31-(bits+1)/2. This makes sense since the topmost bit of the multiplicator is 31, so for an input of 1 bit and 1 bit of output we would always get zero. With the formula adjusted this way, we can get up to ~15% more unique entries at 10 bits and ~24% more at 11 bits. |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||
| make | ||