According to the gcc docs, memcmp is not an intrinsic function of GCC. If you wanted to speed up glibc\'s memcmp under gcc, you would need to use the lower level intrinsics
Now in 2017, GCC and Clang seems to have some optimizations for buffers of sizes 1, 2, 4, 8 and some others, for example 3, 5 and multiple of 8.