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
|
|
@ -272,13 +272,6 @@ int main(int argc, char **argv)
|
|||
* FIXME: This function should return void. */
|
||||
int prepare_memory(void)
|
||||
{
|
||||
/* Fill in prefix length cache */
|
||||
int i, j;
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (j = 0; j < NUM_OF_PREFIX; j++) {
|
||||
prefix_length[i][j] = strlen(prefixes[i][j]);
|
||||
}
|
||||
}
|
||||
config.dhcp_version = VERSION_UNKNOWN;
|
||||
RANGES = 64;
|
||||
num_ranges = num_shared_networks = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue