Re:Hoare’s Rebuttal and Bubble Sort’s Comeback
by gerbenst on Saturday May 30, 2020 @10:27PM
(#23366660)
A very interesting suggestion indeed. Shell sort is an insertion sort though. It owes its better complexity from being able to breaking out of loop early. But these are difficult to predict branches that bubble sort avoids.
Certainly this is worth an experiment
https://stackoverflow.com/questions/2539545/fastest-gap-sequ...
I don't know how to select the fallback sort loop size (related to cache line size maybe?); in his github code he uses 16 elements as the threshold.