memcpy
Nov 30, 2011 at 1:27pm UTC
Then I guess your compiler achieved sentience and tricked you by showing fake compiler output. Did you forget to set const bool skynet = 0;
?
Nov 30, 2011 at 6:52pm UTC
By the way, would someone like to take a stab as to why this thing's times get really short after the first iteration? Even if I increase N to 500 MiB, the time still drops to zero, which is absurd.
Results:
0.040305
0.040487
0.142837
0.103744
0.010694
0.010663
0.035713
0.025857
0.003075
0.003307
0.008988
0.007125
0.000884
0.000727
0.0022
0.001595
4.3e-05
5.6e-05
0.000545
0.000375
1.2e-05
1.1e-05
0.000134
9.5e-05
4e-06
4e-06
3.4e-05
2.4e-05
1e-06
2e-06
1e-05
7e-06
2e-06
2e-06
2e-06
1e-06
2e-06
1e-06
1e-06
0
Averages:
std::copy: 0.0055022
memcpy(): 0.005526
for with offsets: 0.0190464
for with pointers: 0.0138823
...
Nov 30, 2011 at 6:55pm UTC
Those results are similar to what I was expecting.
Nov 30, 2011 at 6:55pm UTC
Yeah, I fixed it already. I was dividing N inside the loop.
Topic archived. No new replies allowed.