06.07.2016, 14:51
You misinterpreted literally everything in my reply. xD
I was comparing memcpy with "array1 = array2;".
Not with and without a loop. Obviously, in that case loop would be slower.
Let me make it more clear on the terms I used.
Normal Loop
Memcpy
Direct assignment
I was comparing memcpy with "array1 = array2;".
Not with and without a loop. Obviously, in that case loop would be slower.
Let me make it more clear on the terms I used.
Normal Loop
Code:
for(new i = 0; i < 50000; i ++) array[i] = 0;
Code:
memcpy(array, dummy, 0, 50000*4);
Code:
array = dummy;