I've been foolish enough to argue with my professor on speed of strncmp() vs. memmove. To prove (or disprove) it for myself, I wrote a C program to compare average cost of each function. Sample output looks like this:
[root@plato root]# ./costs 4000000
Average cost of strncmp: 34.53 nanoseconds
Average cost of memmove: 1102.26 nanoseconds
[root@plato root]#
I guess I was wrong... :)