On Wed, Nov 10, 2010 at 22:08, e-mail number.cruncher <firstname.lastname@example.org>
In short, someone from Intel submitted a glibc patch that does faster
memcpy's on e.g. Intel i7, respects the ISO C definition, but does
However, the commit message and mailing list, as far as I can tell, does not explain how the implementations were benchmarked. Linus claims that his (entirely trivial) implementation matches or beats the new one. If indeed the performance gains claimed by Lu (2X to 4X) are real, then the old implementation must have been truly horrible (as stated by Agner Fog in http://sourceware.org/ml/libc-help/2008-08/msg00007.html
). I'd like to see the benchmark results demonstrating that the backward memcpy is really faster than forward.
I think any software that ignores the ISO warning
"If copying takes place between objects that overlap, the behavior is
undefined" needs fixing.
Absolutely, it is incorrect and should be fixed.