top | item 1145712

How Do I Copy Thee? Let Me Count the Ways ...

4 points| RiderOfGiraffes | 16 years ago |davidavraamides.net | reply

1 comment

order
[+] lqdshadow|16 years ago|reply
Correct me if I am wrong, but isn't it faster to use pointers to increment through the array rather than index the array on each successive char? If it is a particularly large string, the array-copy version of the algorithm would be slower. I have also learned to be concerned about page boundaries. Do modern compilers recognize the idiom and optimize this situation?