1 // Written by Kevin Bealer <kevinbealer@gmail.com>
2 // Found at http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=6978
3 // Sightly modified by Leandro Lucarella <llucax@gmail.com>
4 // (changed not to print anything and lower the total iterations; ported to
7 // Total residency should be ~160 MiB, but it usually increases a lot because
8 // of false positives (probably in the static memory area)
10 import tango.math.random.Random;
14 const I = 50; // original: 200
16 int main(char[][] args)
22 auto rand = new Random();
24 for(int i = 0; i < I; i++) {
25 int[] arr = new int[N];
27 for(int j = 0; j < arr.length; j++) {
32 if (zig > stuff.length)
33 zig = rand.uniform!(int) % stuff.length;