From 0fd90b095e5d567f24c1b3fd476ef79a1f2fcef9 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 22 Aug 2009 17:31:46 -0300 Subject: [PATCH] micro/rnd_data_2.d: Group constants to easily tune the benchmark --- micro/rnd_data_2.d | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/micro/rnd_data_2.d b/micro/rnd_data_2.d index 29d3750..eab18ac 100644 --- a/micro/rnd_data_2.d +++ b/micro/rnd_data_2.d @@ -6,18 +6,20 @@ 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]); -- 2.43.0