in reply to for v. map v. pdl
what exactly is the difference between the usr and the sys seconds in the Benchmark reported timings?
In this particular example, the thing that will account for most of the system time is the program requesting more virtual memory (mostly heap) from the OS.
This is why the single loop over a large array spend a substantially larger proportion of the total time in systime relative to the large number of iterations over a small array.
In the former, the large amount of memory is allocated once and used once.
In the latter, the smaller amount of memory is allocated once for the first run and then reused many times.
|
---|