memcpy vs slice copy

Jarrett Billingsley jarrett.billingsley at gmail.com
Mon Mar 16 12:59:23 PDT 2009


On Mon, Mar 16, 2009 at 3:29 PM, BCS <none at anon.com> wrote:
>> 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?

Sure, then you have to worry about waiting for the *DMA* to finish.
If it's a copy whose result is largely unimportant to the
immediately-following code (copying a backbuffer into a frontbuffer,
for example), it doesn't matter.  But for copying large value types,
I'd think it's pretty important that the copy is semantically atomic.



More information about the Digitalmars-d mailing list