mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 00:06:59 +00:00
xstrstr: speed up analysis by avoiding string comparisons
With large input one should see cut 15% for overall run time. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
d70b08244f
commit
06ffa5ed04
5 changed files with 102 additions and 98 deletions
|
|
@ -210,8 +210,7 @@ void copy_ipaddr(union ipaddr_t *restrict dst,
|
|||
const union ipaddr_t *restrict src);
|
||||
const char *ntop_ipaddr(const union ipaddr_t *ip);
|
||||
double get_range_size(const struct range_t *r);
|
||||
int xstrstr(const char *__restrict a, const char *__restrict b, int len)
|
||||
__attribute__ ((nonnull(1, 2)))
|
||||
int xstrstr(const char *__restrict str)
|
||||
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
__attribute__ ((__hot__))
|
||||
# endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue