Now that modern machines are all multi-core and we have support for SIMD instructions on Windows and Linux boxes with SSE instructions, for example, should I switch to merge sort in my C/C++ code and forget QuickSort? Theoretically, the reason for doing this is that merge sort will parallelize better and use memory/disk more sparingly and thus be faster than QuickSort’s memory intensive operation, but I don’t know. What does practical experience indicate?
I do not want to profile and test every time I sort something. I want to use one standard approach. Currently that approach is QuickSort, because that is the default library sorting routine. I want to know if there are others out there who have switched to MergeSort and experienced better results by making that switchover.
UPDATE————
Graham.Reeds answer to How big is the performance gap between std::sort and std::stable_sort in practice? indicates that anecdotally my guess above is right and switching to MergeSort/stablesort may be correct.
After getting a lot of non-answers, I spent a few hours and did my own research. The result of this is that, yes, merge sort (and other related sorts) are going to be significantly faster due to less intensive use of memory, and better parallelization/multicore exploitation. Moreover, there is a a standard, high-performance library by Intel called IPP that implements merge-type sorts for x86 machines. By switching to this library it looks like I can get greatly improved sorting performance (and other vector type operations) for the types of programming I do.