This patch replace all strncmp(a, b, c) by memcmp(a, b, c). I test on x86_64 (AMD Opteron 285). #include char *A = "0000"; void test_memcmp(void) { memcmp(A, "TEST", 4); } void test_strn(void) { strncmp(A, "TEST", 4); } # gcc -c -O2 test.c # objdump -d test.o ... 0000000000000020 : 20: f3 c3 repz retq 22: 66 66 66 66 66 2e 0f data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1) 29: 1f 84 00 00 00 00 00 0000000000000030 : 30: f3 c3 repz retq Wow, minus one commad :) -- Pavel.