Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Optimize rotate | Bobby Bingham | 2014-08-18 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | Previously, we used three rotations. This was simple, but was aggressively inlined by gcc at higher optimization levels, massively bloating the code. Now, we take the front of the array, which is to be rotated to the end, and using a series of swaps, move it progressively closer to the end. When we can no longer perform a swap of the required size because we're too close to the end, we view the remaining operation as a rotate to the right with a smaller shift size. We repeat as necessary. This generates somewhat smaller code than the three reverses, even at -Os. It also shows up to a 25% overall performance improvement for grailsort on some inputs. | ||||
* | Move wikisort/grailsort common code to a shared header | Bobby Bingham | 2014-07-06 | 1 | -101/+3 |
| | |||||
* | Remove unnecessary safeguard in rotate | Bobby Bingham | 2014-06-30 | 1 | -1/+0 |
| | |||||
* | Move penda info into a struct array | Bobby Bingham | 2014-06-30 | 1 | -24/+25 |
| | |||||
* | Small cleanup | Bobby Bingham | 2014-06-30 | 1 | -5/+2 |
| | |||||
* | Use an array structure to track the temp buffer | Bobby Bingham | 2014-06-30 | 1 | -12/+13 |
| | |||||
* | Rename stract blockarray to more generic "array" | Bobby Bingham | 2014-06-29 | 1 | -15/+15 |
| | |||||
* | Don't bother merging when there are no pending elements | Bobby Bingham | 2014-06-29 | 1 | -3/+6 |
| | |||||
* | Don't roll a b block if it doesn't make sense to | Bobby Bingham | 2014-06-29 | 1 | -6/+2 |
| | | | | | | | This added a pathological case where each iteration we'd roll a b block into place, just to have to do a giant rotate to move all the accumulated b blocks over to make room for the a block that should have been inserted next. | ||||
* | Add wikisort optimizations for some common cases | Bobby Bingham | 2014-06-29 | 1 | -0/+9 |
| | |||||
* | Initial stab at wikisort | Bobby Bingham | 2014-06-29 | 1 | -0/+224 |