summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2014-06-28 23:50:57 -0500
committerBobby Bingham <koorogi@koorogi.info>2014-06-29 12:10:20 -0500
commit9138a7a2a3e0d6e784acb5c2cc6f31bddbf27bd2 (patch)
tree536cfc5771260d10cc1aae9cb725d5b170eb5a2a
parent76e03ea9b71186cf6a67d801590b12c531a1e78a (diff)
Run smaller test cases before larger
-rw-r--r--bench.c4
1 files 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);