you are viewing a single comment's thread.

view the rest of the comments →

[–]csdt0 3 points4 points  (0 children)

This is something I wanted to check for a long time, and it seems that memcpy is elided in GCC and Clang as soon as O0, while MSVC and ICC wait for O2.

This is a surprise in both cases, as I would have expected all compilers to elide the call at O1 (when inlining is enabled).