summaryrefslogtreecommitdiff
path: root/grailsort.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix grailsort block mergingBobby Bingham2014-09-011-28/+28
| | | | | Previously, we did not correctly handle some cases where a block contained elements with a uniform value.
* Use binary search in mergeBobby Bingham2014-08-231-4/+3
|
* Slightly simplify grailsortBobby Bingham2014-08-161-7/+8
| | | | | Remove unused pending variable, and unused return value from merge(). Saves 29 bytes on x86_64.
* Remove unnecessary test of bnmelBobby Bingham2014-08-031-1/+1
|
* ReformatBobby Bingham2014-07-311-10/+3
|
* Remove grailsort dependency on bsearchBobby Bingham2014-07-311-3/+3
|
* Don't pre-sort the temp swap bufferBobby Bingham2014-07-311-4/+5
| | | | | | | | | This is a close call. On the one hand, this buffer will get jumbled when used for merging adjacent blocks, so we'll need to sort it again before distributing it. On the other hand, by sorting it early, we know that we won't have to distribute it very far. In testing, pre-sorting seems to lose out overall.
* Don't special-case reverse sort orderBobby Bingham2014-07-311-6/+0
| | | | This increases code size, and doesn't seem to help very significantly.
* Move wikisort/grailsort common code to a shared headerBobby Bingham2014-07-061-109/+8
|
* Add an implementation of grailsortBobby Bingham2014-07-061-0/+192