On Wednesday, May 31, 2017 22:50:19 H. S. Teoh via Digitalmars-d-learn wrote: > Perhaps the right approach is to check if the array length is less than > some arbitrary threshold, and just use a naïve loop below that, and only > switch to the complicated hackish stuff where you're sure it will > actually benefit, rather than hurt, performance.
Based on some previous discussions, I think that this is the sort of thing that std.algorithm.sort does (switch algorithms depending on the size of the range to be sorted), but I've never actually verified it. - Jonathan M Davis