From 8161ac06785068da5234553b528ecbbc8339e232 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 2 Nov 2014 22:34:23 -0600 Subject: Fill buffer with smallest elements This avoids the need to distribute the buffer through the whole array at the end. It also allows us to skips most of the work for sorted and reverse-sorted inputs. --- counts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'counts.c') diff --git a/counts.c b/counts.c index d1f3910..f644706 100644 --- a/counts.c +++ b/counts.c @@ -30,7 +30,7 @@ void add_counts(struct counts *target, struct counts *snapshot) void print_counts(void) { - char *labels[] = {"total", "sortnet", "overlap", "merge", "move buffer", "distribute"}; + char *labels[] = {"total", "sortnet", "check sorted", "steal buffer", "overlap", "merge", "distribute" }; for (int i = 0; i < MAX_COUNTS; i++) { const struct counts *c = counts+i; dprintf(42, "%12s: %10lu cmp, %10lu swap, %10lu rotate\n", labels[i], c->compare, c->swap, c->rotate); -- cgit v1.2.3