You should use memmove when there's a chance that the source and destination buffers overlap - it is specified to work in that case, whereas memcpy isn't.
In theory memcpy can be faster, if only because it doesn't check for overlapping memory buffers.
You should use
memmovewhen there's a chance that the source and destination buffers overlap - it is specified to work in that case, whereasmemcpyisn't.In theory
memcpycan be faster, if only because it doesn't check for overlapping memory buffers.