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
想要评论请 注册 或 登录