While playing around with stable sorting I implemented Mergesort.
It is not suitable for productive use as it’s quite slow. It’s about ten times slower than the stable_sort method from my another post. A little benchmark sorting an array of 2,000,000 random integers:
user system total real
Original Sort 0.630000 0.010000 0.640000 ( 0.639860)
Stable Sort 12.780000 0.700000 13.480000 ( 13.477982)
Mergesort 109.170000 13.420000 122.590000 (122.617323)