News for hackers. Stuff that matters.
Re:Hoare’s Rebuttal and Bubble Sort’s Comeback by frankmcsherry on Sunday May 31, 2020 @12:04PM (#23370403)
I think the median of the results works great in any case (but, you are the expert here). If we find the result median in each of the two inputs, say 'a' and 'b' we have four merges (two forward, two reverse):

    [0, ..) w (0, ..)
    (.., a) w (.., b)
    [a, ..) w [b, ..)
    (.., n) w (.., n)
each of which should produce n/4 elements and then meet.

If the array is already sorted then great; that split will just "merge":

    [0, ..) w nothing
    (.., n/2) w nothing
    nothing w [n/2, ..)
    nothing w (.., n)
which should go very fast. Anyhow, possible I'm missing something!
Re:Hoare’s Rebuttal and Bubble Sort’s Comeback by gerbenst on Sunday May 31, 2020 @12:51PM (#23370756)
No you are not missing something. This is, I think, correct. I haven't tried it but it seems possible and possibly very effective.