Are there faster alternatives to memcpy() in C++?
See Question&Answers more detail:osFirst, a word of advice. Assume that the people who wrote your standard library are not stupid. If there was a faster way to implement a general memcpy, they'd have done it.
Second, yes, there are better alternatives.
std::copy
function. It does the same thing, but it is 1) safer, and 2) potentially faster in some cases. It is a template, meaning that it can be specialized for specific types, making it potentially faster than the general C memcpy.