]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stick-table: store a per-table hash seed and use it
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Nov 2022 17:53:06 +0000 (18:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Nov 2022 17:58:06 +0000 (18:58 +0100)
commit56460ee52a1624bb68717afabb0644b5aec7a88d
tree0d1c0a5622ff734fe7415c273b96f6572d8a7fdc
parent63b5b33ba8f9330193bce231a16e17a9e01457fb
MINOR: stick-table: store a per-table hash seed and use it

Instead of using memcpy() to concatenate the table's name to the key when
allocating an stksess, let's compute once for all a per-table seed at boot
time and use it to calculate the key's hash. This saves two memcpy() and
the usage of a chunk, it's always nice in a fast path.

When tested under extreme conditions with a 80-byte long table name, it
showed a 1% performance increase.
include/haproxy/stick_table-t.h
src/stick_table.c