i dont really trust the compiler to auto vectorize as much as other people seem to in general. it tends to be fairly bad at it
A very nice article about it: Behind `memcpy`/`memmove`: overlap, words and alignment
Turns out sometimes for additional perf you may want to align the pointers with shifts, and sometimes you can even use kernel to remap (lazy copy) the underlying pages instead of doing the copy ![]()
My first suspicion would be it can't assume the ranges don't overlap due to being through pointers. If they overlap by less than the register width a naive transformation would change the semantics.