What is the fastest portable way to copy an array in C++

后端 未结 8 573
面向向阳花
面向向阳花 2020-12-30 02:11

This question has been bothering me for some time. The possibilities I am considering are

  1. memcpy
  2. std::copy
  3. cblas_dcopy

Does a

8条回答
  •  清歌不尽
    2020-12-30 02:54

    memcpy, however, if your array contains non-trivial objects, stick with std::copy.

提交回复
热议问题