X-Git-Url: https://git.llucax.com/software/dgc/dgcbench.git/blobdiff_plain/679a50ca73feaa4c3785f756b97f9ef59872adf7..f430308cdc808f9a511e4d0518fa75bffa223dd4:/micro/rnd_data_2.d diff --git a/micro/rnd_data_2.d b/micro/rnd_data_2.d index 29d3750..1cd89bf 100644 --- a/micro/rnd_data_2.d +++ b/micro/rnd_data_2.d @@ -4,20 +4,25 @@ // (changed not to print anything and lower the total iterations; ported to // Tango) +// Total residency should be ~160 MiB, but it usually increases a lot because +// of false positives (probably in the static memory area) + import tango.math.random.Random; +const N = 2_000_000; +const L = 20; +const I = 50; // original: 200 + int main(char[][] args) { int[][] stuff; - int NUM = 2_000_000; - - stuff.length = 20; + stuff.length = L; auto rand = new Random(); - for(int i = 0; i < 200; i++) { - int[] arr = new int[NUM]; + for(int i = 0; i < I; i++) { + int[] arr = new int[N]; for(int j = 0; j < arr.length; j++) { rand(arr[j]);