This is a port of rust-memchr's fallback and SSE2 memchr()
implementations to C. It is distributed under the same licenses: MIT and
UNLICENSE.
In my limited tests, the fallback version ranges from about equal to 5.5x faster
than FreeBSD's stock memchr()
(a simple bytewise loop) on amd64.
On i386 it's about 2.6x slower; 1.7x slower if uintptr_t
is replaced with
uint64_t
.
The SSE2 version is about 2.5-13x faster.