memcpy vs slice copy

BCS none at anon.com
Mon Mar 16 13:11:58 PDT 2009


Hello Don,

> BCS wrote:
> 
>> Hello Jarrett,
>> 
>>> I'm actually kind of shocked that given the prevalence of memory
>>> block copy operations that more CPUs haven't implemented it as a
>>> basic instruction.  Yes, RISC is nice, but geez, this seems like a
>>> no-brainer.
>>> 
>> How about memory to memory DMA, Why even make the CPU wait for it to
>> finish?
>> 
> That actually happens, to some extent, on some CPUs. If you get
> everything right, the data only goes to the outermost cache, and never
> reaches the CPU itself.
> 

I was thinking even more aggressive, for instance: I wonder how much more 
silicon it would take to allow copied that happen to be on the same DIMM 
to never even touch the motherboard?

I can think of some cases where this would be very useful (large matrix transposition 
for one would work well if the memory is set up for arbitrary striding)





More information about the Digitalmars-d mailing list