Willy Tarreau 58946d44f8 MINOR: tools: improve ptr hash distribution on 64 bits
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.
2023-08-12 19:04:34 +02:00
..
2023-08-01 10:49:06 +02:00
2023-01-27 15:18:59 +01:00
2023-04-13 16:57:51 +02:00
2021-11-18 10:50:58 +01:00
2022-04-22 15:45:47 +02:00
2022-11-29 15:14:39 +01:00
2023-05-04 18:09:50 +02:00
2023-05-31 16:29:19 +02:00