-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdqselect? #11
Comments
I remember having tried that at some point when implementing a derivative of QuickXSort without noticing significant benefits compared to the libc++ implementation of Now if another try proved to be faster than my old benchmarks it would be welcome. |
I've thought about it, but haven't put in the time. It should be a fairly simple modification from pdqsort though. I don't know if it's worth it. |
We also need something like |
This project provides a pdqselect implementation and a comparison to other selection algorithms: https://github.com/danlark1/miniselect |
I'm using
pqdsort
in my ranges library (slightly modified to support projections, proxy iterators andconstexpr
evaluation). I think it's fantastic, and it's proven almost always faster (and never slower) than both libc++ and libstdc++std::sort()
in every benchmark I've tried.Have you given any thought to writing a companion "pdqselect" algorithm to implement
std::nth_element()
? As far as I know all the mainstream C++ implementations ofnth_element
use introselect, but it seems that (in principle at least) this algorithm could benefit from the same optimisations that pdqsort uses relative to introsort.(A quick Google turned up this Rust crate, but it doesn't seem to be part of the Rust standard library yet.)
The text was updated successfully, but these errors were encountered: