memcpy efficiency

I have an HD bitmap image in memory, 1920x1080 pixels, 4 bytes each pixel.

I have two options for my algorithm:

1. memcpy the alternating 1080 lines (half the height). that results in (1080/2) = 540 memcpy operations of (1920*4) bytes each. (total 3.96 MB)

2. memcpy the entire image. that results in a SINGLE memcpy operation of 1920*1080*4 bytes = 7.9 MB.

Which takes longer? 540 moves with a total of 3.96 MB or a single move of 7.9 MB?

Thanks and Regards

Reuben Sant
Wouldn't it be faster to measure it yourself rather than asking and waiting for a reply?
540 moves would be faster, because the total amount is smaller.
Topic archived. No new replies allowed.