If s and t are char pointers in registers, while (*s++ = *t++) ; generates the best code I could possibly imagine. while ((*s = *t) != '\0') {s++; t++;} is considerably worse. Try it with register variables on your compiler.