Question: is memcpy faster than assignment?
Answer: 1 Answer. You should never expect them outperform assignments. The reason is, the compiler will use memcpy anyway when it thinks it would be faster (if you use optimize flags). ... The default is -mno-memcpy, which allows GCC to inline most constant-sized copies.