summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2014-07-31 20:44:46 -0500
committerBobby Bingham <koorogi@koorogi.info>2014-07-31 20:44:46 -0500
commit74d5842810fd74a5dca7b087d7129faab941a18b (patch)
tree8a7647f45906edc8a5a7a47dadc0353ca95e2f46
parentda240b7d6c335a46e0bbe1de9a5cc5bccaef9d47 (diff)
Don't special-case reverse sort order
This increases code size, and doesn't seem to help very significantly.
-rw-r--r--grailsort.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/grailsort.c b/grailsort.c
index 5edf40b..6e360dc 100644
--- a/grailsort.c
+++ b/grailsort.c
@@ -68,12 +68,6 @@ void grailsort(void *unsorted, size_t nmel, size_t width, cmpfun cmp)
/* if already sorted, nothing to do */
if (cmp(TAIL(a, acount * blknmel, width), b) <= 0) return;
- /* if blocks in b are all less than those in a, just need a rotate */
- if (cmp(TAIL(base, nmel, width), base) <= 0) {
- rotate(base, nmel, width, acount * blknmel + bufnmel);
- return;
- }
-
/* sort all the a and b blocks together by their head elements */
grailsort(a, blocks, bwidth, cmp);