Use memcmp() rather than strncmp() when shorter string length is known.
It appears that this will be faster for all but the shortest strings; at least one some platforms, memcmp() can use word-at-a-time comparisons. Noah Misch, somewhat pared down.
Showing
Please register or sign in to comment