Remove the byte-to-byte compares in match and prefix searches.
Vector extensions are common hardware now, as are C libraries that use vector instructions to implement functions like memcmp(). So we hand off compares to the lib to get the advantage. For the same reason, we can afford to call strlen() on the subject string to locate the terminating null, rather than scan for it. Also, the match function descends through the trie to find a potential match, and does the comparison only then, as is common for trie/critbit/patricia implementations.
Showing
Please register or sign in to comment