<div dir="ltr">A while back I shortly discussed this with M. Clow, today I post it here to poll public interest.<div><br></div><div>I'd like to present pattern-defeating quicksort, a novel sorting algorithm. It is as fast or faster than std::sort on any implementation I've tested (libstdc++, libc++, VS2013) for both random data and a variety of patterns (equal, asc/desc, pipe organ, etc).</div><div><br></div><div>A short explanation of the design of pdqsort can be found in the readme: <a href="https://github.com/orlp/pdqsort">https://github.com/orlp/pdqsort</a> .</div><div><br></div><div>The performance chart included in the readme is benchmarked against libstdc++, a comparison with libc++ (compiled with clang) can be found here: <a href="http://i.imgur.com/JRiJk0g.png">http://i.imgur.com/JRiJk0g.png</a> .</div><div><br></div><div>The code of pdqsort is very short (~300LOC) and clean. Understanding pdqsort and integration should be painless.</div><div><br></div><div>I'm willing to prepare a patch and do the legal wizardry required to integrate pdqsort as std::sort in libstdc++, if the interest is there. This would also solve this bug I found: <a href="https://llvm.org/bugs/show_bug.cgi?id=20837">https://llvm.org/bugs/show_bug.cgi?id=20837</a></div><div><br></div><div>If you have any questions after reading the readme, please do reply and I will do my best to answer them.</div><div><br></div><div><br></div><div>Greetings,</div><div><br></div><div>Orson Peters</div></div>