[libstdc++] pdqsort - a faster std::sort
Orson Peters
orsonpeters@gmail.com
Tue Apr 7 13:44:00 GMT 2015
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).
A short explanation of the design of pdqsort can be found in the readme:
https://github.com/orlp/pdqsort .
The code of pdqsort is very short (~300LOC) and clean. Understanding
pdqsort and integration should be painless.
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.
If you have any questions after reading the readme, please do reply and I
will do my best to answer them.
Greetings,
Orson Peters
P.S.: I submitted the same code to the libc++ mailing list. AFAIK there are
no license issues with committing the code to both projects.
More information about the Libstdc++
mailing list