Array append performance

Lionello Lunesu lionello at lunesu.remove.com
Fri Aug 29 00:22:54 PDT 2008


"Walter Bright" <newshound1 at digitalmars.com> wrote in message 
news:g96sji$2s1a$1 at digitalmars.com...
> But for 4 bytes, how much slower could it be than memcpy, which executes a 
> lot of setup code?

I don't know.

I do know that I noticed a speed difference and that you asked me personally 
to do some more timings. And I've provided you with detailed timings, which 
prove, against popular belief, that memcpy is faster than rep movsb. Now 
apparently the conclusion is that A) "copying the same data over and over 
again is not
representative of actual usage", and B) "[you're] having a real hard time 
believing that for the 4 byte
case, memcpy is faster."

I guess this subject is closed, but somehow I'm left with a somewhat 
unsatisfied feeling..

L. 




More information about the Digitalmars-d mailing list