On Mon, Nov 05, 2007 at 09:15:45AM +0200, Kaul wrote:
> Somewhat inspired by the performance improvements to tvbuff, I've made
> some small performance improvements to packet-http.c:
> 1. In the most common cases 'GET ', 'POST', 'HTTP' - compare them
> against the 32bit value of those strings, instead of strncmp(). I
> reckon in most cases it'll be used, and there won't be need for longer
> comparison paths.
Is this a significant enough performance improvement to warrant making
the code a bit harder to read, maintain and understand? The strncmp()
function, at least in a recent FreeBSD libc, looks pretty quick and
simple as it is. I am just wondering; I do not mean to discourage you
from you from contributing.
Steve