]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: fdtab: flatten the struct and merge the spec struct with the rest
authorWilly Tarreau <w@1wt.eu>
Sun, 2 Sep 2012 20:19:18 +0000 (22:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Sep 2012 18:49:14 +0000 (20:49 +0200)
commit45dab73788967ce459b40e5a158cd7af038a45e2
treece94f7bc58f071dd3fec063fb7c4d260f2f1633c
parent40ff59d82097edbfc400e3243b8287c118ab5d10
CLEANUP: fdtab: flatten the struct and merge the spec struct with the rest

The "spec" sub-struct was using 8 bytes for only 5 needed. There is no
reason to keep it as a struct, it doesn't bring any value. By flattening
it, we can merge the single byte with the next single byte, resulting in
an immediate saving of 4 bytes (20%). Interestingly, tests have shown a
steady performance gain of 0.6% after this change, which can possibly be
attributed to a more cache-line friendly struct.
include/types/fd.h
src/ev_sepoll.c