haproxy/dev/phash
Willy Tarreau 3e31e2927c DEV: phash: add a trivial perfect hash generator for integers
We have a few places where we're checking many status codes. The sets
are so small that just a multiply, a shift and an optional xor are
sufficient to turn that into a smaller set. The program used to produce
them is hackish as it allows to easily fiddle with various operations
manually and experiment by brute-forcing a pair of integers for the
mul and the xor. It also supports producing an incomplete table that
gives an easier modulo operation. Let's commit it as-is so that it can
be reused later (e.g. if new status codes are introduced for example).
2024-01-11 15:10:08 +01:00
..
phash.c DEV: phash: add a trivial perfect hash generator for integers 2024-01-11 15:10:08 +01:00