]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: http: move all http character classs tables into a single one
authorWilly Tarreau <w@1wt.eu>
Sat, 5 Nov 2016 14:50:20 +0000 (15:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 5 Nov 2016 14:58:08 +0000 (15:58 +0100)
commit2235b261b6163cf20325e519c13c3f93f16b4d3a
treee09e62f60f45b2f9f3789f67ca073e7360699c40
parentdc3a9e830c3f91774f67693cf766f293dc673ec9
OPTIM: http: move all http character classs tables into a single one

We used to have 7 different character classes, each was 256 bytes long,
resulting in almost 2kB being used in the L1 cache. It's as cheap to
test a bit than to check the byte is not null, so let's store a 7-bit
composite value and check for the respective bits there instead.

The executable is now 4 kB smaller and the performance on small
objects increased by about 1% to 222k requests/second with a config
involving 4 http-request rules including 1 header lookup, one header
replacement, and 2 variable assignments.
include/proto/proto_http.h
src/flt_http_comp.c
src/proto_http.c
src/sample.c