commit | 26b66a3545eb076ae64305145a7b559968af5542 | [log] [tgz] |
---|---|---|
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | Fri Dec 11 14:59:23 2020 +0100 |
committer | Tom Rini <trini@konsulko.com> | Sat Jan 16 14:49:09 2021 -0500 |
tree | f4b242d831693ea73264ed44cb06d6f0912e83d4 | |
parent | 42149c9682d35265c6d606dc489a12cbf3a52ebc [diff] |
string: Use memcpy() within memmove() when we can A common use of memmove() can be handled by memcpy(). Also memcpy() includes an optimization for large sizes: it copies a word at a time. So we can get a speed-up by calling memcpy() to handle our move in this case. Update memmove() to call also memcpy() if the source don't overlap the destination (src + count <= dest). Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>