In what cases should I use memcpy over standard operators in C++?

前端 未结 7 1645
梦毁少年i
梦毁少年i 2020-12-13 06:36

When can I get better performance using memcpy or how do I benefit from using it? For example:

float a[3]; float b[3];

is cod

相关标签:
7条回答
  • 2020-12-13 07:08

    Compilers specifically optimize memcpy calls, at least clang & gcc does. So you should prefer it wherever you can.

    0 讨论(0)
提交回复
热议问题