From 9a32b4439eeadfda9d990b6e9c346debf55b22e5 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 5 Jul 2010 20:12:46 -0300 Subject: [PATCH] micro: Change constants to do a some more processing This will make measures more meaningful. --- micro/big_arrays.d | 6 +++--- micro/rnd_data.d | 2 +- micro/tree.d | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/micro/big_arrays.d b/micro/big_arrays.d index a1f59c5..3f0fb4f 100644 --- a/micro/big_arrays.d +++ b/micro/big_arrays.d @@ -3,9 +3,9 @@ // Sightly modified by Leandro Lucarella // (some readability improvements and output removed) -const IT = 100; // original: 300 -const N1 = 200; // original: 20_000 -const N2 = 400; // original: 40_000 +const IT = 300; +const N1 = 20_000; +const N2 = 40_000; class Individual { diff --git a/micro/rnd_data.d b/micro/rnd_data.d index 3a1105c..aa71355 100644 --- a/micro/rnd_data.d +++ b/micro/rnd_data.d @@ -5,7 +5,7 @@ import tango.math.random.Random; -const IT = 5_000; // original: 50_000 +const IT = 50_000; void main() { // The real memory use, ~55 KiB (original: ~20 MiB) diff --git a/micro/tree.d b/micro/tree.d index 005878e..a5179a3 100644 --- a/micro/tree.d +++ b/micro/tree.d @@ -25,8 +25,8 @@ TreeNode makeTree(int item, int depth) { } void main(char[][] args) { - const minDepth = 4; - int n = 6; // 13; + const minDepth = 5; + int n = 15; int maxDepth = (minDepth + 2) > n ? minDepth + 2 : n; int check = makeTree(0, maxDepth + 1).check; -- 2.43.0