Re:“It is never a compiler error”
by kccqzy on Tuesday November 14, 2017 @05:36PM
(#15699868)
A common optimization is to use insertion sort for small arrays (less than 64) and quicksort/heapsort/introsort for larger ones. Usually because better algorithms in terms of Big O have worse constant factors.
[ Parent
| on HN ]
Last time I looked at the source for Java's dual pivot quicksort implementation, it used exactly this for 7 elements or fewer