Stable merge sort in python, replaced by insertion sort on small sizes.