Disabling the GC for the filling up the array of arrays just improves the
performance, but has no point in the what the benchmark is trying to test.
// (changed not to print anything and lower the total iterations; ported to
// Tango)
-import tango.core.Memory;
import tango.math.random.Random;
int main(char[][] args)
stuff.length = 20;
- GC.disable();
-
auto rand = new Random();
for(int i = 0; i < 200; i++) {
zig = rand.uniform!(int) % stuff.length;
stuff[zig] = arr;
-
- if (i == 20) {
- GC.enable();
- }
}
return 0;