http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048
--- Comment #11 from Marc Glisse <glisse at gcc dot gnu.org> --- memcmp is pure and gcc manages to pull it out of the loop (see the file created by -fdump-tree-optimized). It is funny that -fno-builtin-strcmp makes the code more than 2 times faster (the main difference I can see is using "repz cmpsb" instead of a call to the libc function strcmp).