Live data from Hacker News

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

davidavraamides.net

1–2 of 2 posts

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

#2
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?