A memchr function implementation has been proposed for the Linux kernel that operates up to 4 times faster.
A set of patches has been proposed for inclusion in the Linux kernel, featuring an optimized implementation of the memchr() function, which is used for searching for a character in an array. Unlike the older version that relied on byte-by-byte comparison, the proposed implementation is designed to fully utilize 64-bit and 32-bit CPU registers. Instead of bytes, comparisons are conducted using machine words, allowing multiple comparisons at once […]
