-
Notifications
You must be signed in to change notification settings - Fork 178
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
Can we make Data.Sequence.sort incremental and/or faster? #143
Comments
OK, so I thought about this a bit more, and it's definitely possible to do it (probably with terrible constant factors) using a variant of quicksort with median-of-medians partitioning. Specifically, partition out result digits using the appropriate (very lopsided at the top) order statistics, then build 2-3 trees using |
Optimal Incremental Sorting by Rodrigo Paredes and Gonzalo Navarro appears to be relevant. Their algorithm (based on QuickSelect) works from just one end, whereas we'd need to work from both, but there may be ideas we can use. |
I'm hardly familiar with this topic, but I think https://github.com/treeowl/sort-traversable is related. |
It's not, or at least not obviously so. |
A few years ago, I played around with something like this using the machinery behind |
I admit that this idea is most likely insane, but there are a few vague ideas running around in my head and I figured I might as well get them out in the open in case they inspire someone.
The text was updated successfully, but these errors were encountered: