<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, I used a paper called "Ratio based in-place stable merging" to implement a hybrid stable sort algorithm, and have been validating the results against stable_sort and inplace_stable_sort. What's interesting is that it matches 80-90% of the speed of stable_sort with random data, is much faster in many other cases, and does so while using O(1) memory. Simply giving it more memory allows it to closely match stable_sort in speed. And compared to inplace_stable_sort it's anywhere from 3-15x faster, with random data being about 5x faster.<div><br></div><div>I have fully documented the algorithm and have a C++ implementation available here:</div><div><a href="https://github.com/BonzaiThePenguin/WikiSort">https://github.com/BonzaiThePenguin/WikiSort</a></div><div><br></div><div>The underlying algorithm was vetted and proven back in 2008 (there's a link to the published paper on the GitHub project page), and the simplified version used here is constantly tested against existing algorithms for correctness and speed, but toying with a core feature of libc++ is obviously not something to be taken lightly so I'm hoping for some additional vetting and consideration.</div><div><br></div><div>My ultimate goal would be to replace inplace_stable_sort at the very least, and ideally stable_sort as well. Maybe including it as a separate sort function for now would be wise?</div><div><br></div><div>- Mike</div><div><br></div></body></html>