I understand that memmove
and memcpy
difference is that memmove
handles the memory overlap case. I have checked the implementation in libgcc and got this article [memcpy performance] from the intel website.
In libgcc, the memmove
is similar to memcpy
, both just go though one byte and byte, so the performance should be almost same even after optimization.
Someone has measured this and got this article memcopy, memmove, and Speed over Safety. Even I don't think the memmove
can be faster than memcpy
, but there should be no big difference at least on Intel
platform.
So in what platform and how, memcpy
can be significantly faster than memmove
, if there is none, why providing two similiar functions instead of just memmove
, and lead to a lots of bug.
Edit: I'm not asking the difference of memmove and memcpy, I know memmove can handle overlap issue. The question is about is there really any platform where memcpy is faster than memmove?