]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: channel: inline channel_forward's fast path
authorWilly Tarreau <w@1wt.eu>
Thu, 25 Oct 2012 22:21:52 +0000 (00:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 25 Oct 2012 23:08:01 +0000 (01:08 +0200)
commit55a6906125a2e578e2eee901440de008dbf8a317
treea8828c84d527c60b687c9a7007a274041aa42961
parent69fa99292e689e355080d83ab19db4698b7c502b
OPTIM: channel: inline channel_forward's fast path

Most calls to channel_forward() are performed with short byte counts and
are already optimized in channel_forward() taking just a few instructions.
Thus it's a waste of CPU cycles to call a function for this, let's just
inline the short byte count case and fall back to the common one for
remaining situations.

Doing so has increased the chunked encoding parser's performance by 12% !
include/proto/channel.h
src/channel.c