Reply to bearophile,

BCS:

It depends. If the array is not accessed all at once, the OS needs
only to set up the virtual memory maps and then page fault in the
pages as needed. If [...]

I have timed tree versions of that little code:
D without = void: first run 1.85 s, successive ones: 0.11 s
D with = void: first run 0.24 s, successive ones: 0.10 s
C compiled with DMC: first run: 0.10 s, successive ones: 0.06 s
C compiled with GCC: first run: 0.07 s, successive ones: 0.05 s
(Compilations with no arguments. GCC compiled with -s -Os). So that
huge executable is bad for the speed too.

Bye,
bearophile

That dosn't test what I was looking at. Try it without the init loop, I'll bet you won't see any difference between the cases at all.


Reply via email to