Is 2X faster large memcpy interesting?

Walter Bright newshound1 at digitalmars.com
Thu Mar 26 15:12:57 PDT 2009


Andrei Alexandrescu wrote:
> I'd think so. In this day and age it is appalling that we don't quite 
> know how to quickly copy memory around. A long time ago I ran some 
> measurements (http://www.ddj.com/cpp/184403799) and I was quite 
> surprised. My musings were as true then as now. And now we're getting to 
> the second freakin' Space Odyssey!

It turns out that efficiently copying objects only a few bytes long 
requires a bunch of code. So, I gave up on having the compiler generate 
intrinsic memcpy code, and instead just call the library function 
memcpy. This is implemented in the next update.



More information about the Digitalmars-d mailing list