Fast O(n) stable sorting algorithm. C++ implementation. It outperforms std::sort and std::stable_sort on N > 100 for both primitive types and complex objects.