Commit Graph

2 Commits

Author SHA1 Message Date
Christopher Faulet 41f28b3c53 DEV: phash: Update 414 and 431 status codes to phash
The phash tool was updated to reflect the previous change. 414 and 431 are
now part of the handled status codes.
2024-11-19 15:29:40 +01:00
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