Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Won't Do
-
None
-
None
-
None
-
ghx-label-14
Description
Introsort is the standard hybrid sort implementation https://en.wikipedia.org/wiki/Introsort which chooses between quicksort, heapsort, and insertion sort given the current sort run size.
Currently the Sorter uses quicksort with insertion sort for batches smaller than 16. With introsort in cases where the quisksort partitions the data above a threshold 2*log(N), then the algorithm switches to using heapsort.
This should help mitigate worse case pivot selections.