]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: session: put unlikely() around the freewheeling code
authorWilly Tarreau <w@1wt.eu>
Tue, 31 Dec 2013 22:56:46 +0000 (23:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Dec 2013 22:56:46 +0000 (23:56 +0100)
commit2b028dd828cdb5ed88be856115395296634c6fa6
treef78bb128a1b7aedb5ad8906016ef4b3fd6a237a0
parent9fe7aae6eb4b0576832bfaf5b10fa97cbbdf34b5
OPTIM: session: put unlikely() around the freewheeling code

The code which enables tunnel mode or TCP transfers is rarely used
and at most once per session. Putting it in an unlikely() clause
reduces the length of the hot path of process_session() which is
already quite long, and also slightly reduces its overall size.
Some measurements show a steady gain of about 0.2% thanks to this.
src/session.c