mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-26 03:03:51 -04:00
A lot of places call two ha_random64() in a row to generate a 128-bit random. While it's now safe against linear analysis thanks to the XXH64 call, it's still particularly expensive due to the lock. Here we introduce a new function ha_random64_pair_hashed(), that feeds two uint64_t with a hash of the PRNG's internal state, and make it advance. This will cut in half the number of calls to ha_random64() and should recover a part of the performance lost in the lock. For now it's not used. |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||
| make | ||