lebedev.ri added a comment.

Thinking about it more, i have some negative reservations about this :/

As it can be seen form https://godbolt.org/z/3BZmCM, it seems any and every(?) 
alternative C++ algorithm
replacement is a performance pessimization in the general case, because 
`memcpy` requires/'guarantees'
that there must be no overlap between source and destination ranges,
while there is no such restriction for C++ algorithms (=> they will get 
optimized into `memmove`).
That is unless optimizer also manages to prove that it is safe to optimize 
`memmove` into `memcpy` there.
(Extra bloat `if(num != 0) memmove` is also not always good)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63324/new/

https://reviews.llvm.org/D63324



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to