<div dir="ltr"><span style="font-size:12.8000001907349px">I’ve added “[libcxx]” to the subject of this email.  It was accidentally omitted from my original post, and this may have caused this post to be accidentally overlooked by the libc++ development team.</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">A while back I shortly discussed this with M. Clow, today I post it here to poll public interest.</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I'd like to present pattern-defeating quicksort, a novel sorting algorithm. It is as fast or faster than std::<span class="">sort</span> 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 style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">A short explanation of the design of pdqsort can be found in the readme: <a href="https://github.com/orlp/pdqsort" target="_blank">https://github.com/orlp/pdqsort</a> .</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">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" target="_blank">http://i.imgur.com/JRiJk0g.png</a> .</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">The code of pdqsort is very short (~300LOC) and clean. Understanding pdqsort and integration should be painless.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I'm willing to prepare a patch and do the legal wizardry required to integrate pdqsort as std::<span class="">sort</span> 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" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=20837</a></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">If you have any questions after reading the readme, please do reply and I will do my best to answer them.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Greetings,</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Orson Peters</div></div></div>