performance improvements: replace memcmp
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 22 Nov 2010 23:30:57 +0000 (00:30 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 22 Nov 2010 23:30:57 +0000 (00:30 +0100)
commitc574896cf7ffa73d73847e3e247d1824b4fa9f03
treef0598ecd1959318b13667d08991514b8e59b1624
parentbd2bcd12cf61887d83f377e5fe6e3790fd86297c
performance improvements: replace memcmp

 - looping forward while moving a pointer and doing memcmp isn't fast. replace it by strstr
 - \r\n can be done in a pointer dereferencing comparison.

Note: maybe we need to fallback to the memcmp way if there is binary content?
In that case we should do a little smarter and try to use contentlength-headers etc.
libcitadel/lib/libcitadel.h
libcitadel/lib/mime_parser.c