From 9138a7a2a3e0d6e784acb5c2cc6f31bddbf27bd2 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sat, 28 Jun 2014 23:50:57 -0500 Subject: Run smaller test cases before larger --- bench.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bench.c b/bench.c index 65bb99c..abcaca9 100644 --- a/bench.c +++ b/bench.c @@ -50,8 +50,8 @@ int main() puts(""); for (const struct sorter *s = sorters; s->name; s++) { - for (size_t size = MAX_SIZE; size >= MIN_SIZE; size /= 10) { - printf("%-*s ", SORT_WIDTH, size == MAX_SIZE ? s->name : ""); + for (size_t size = MIN_SIZE; size <= MAX_SIZE; size *= 10) { + printf("%-*s ", SORT_WIDTH, size == MIN_SIZE ? s->name : ""); for (const struct generator *g = generators; g->name; g++) { comparisons = 0; g->func(buffer, size); -- cgit v1.2.3