Commits on March 21, 2006
Commits1 commit
0Author
1Committer
0Reviewer
0Reported by
0Co-author
| Credit | Commit | Branches | Thread(s) | Committed |
|---|---|---|---|---|
| CommitterBackported | Improve performance of our private version of qsort. Per recent testing, the logic it contained to switch to insertion sort for near-sorted input was in fact a big loss, because it could fairly easily be fooled into applying insertion sort to large subfiles that weren't all that well ordered. Remove that, and instead add a simple check for already-perfectly-sorted input, as per suggestion from Dann Corbit. This adds at worst O(N*lgN) overhead, and usually far less, while sometimes allowing a subfile sort to finish in O(N) time. Preliminary testing says this is an improvement over the basic Bentley & McIlroy code for many nonrandom inputs, and it costs almost nothing when the input is random. | master8.2beta1REL_19_STABLE8.2beta1REL_18_STABLE8.2beta1REL_17_STABLE8.2beta1REL_16_STABLE8.2beta1REL_15_STABLE8.2beta1REL_14_STABLE8.2beta1REL_13_STABLE8.2beta1+19 more | Mar 21, 2006 |