-
Notifications
You must be signed in to change notification settings - Fork 27
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
Three-way partioning Quick Sort #19
base: main
Are you sure you want to change the base?
Conversation
It seems that the function |
At this point it seems like we can just drop 0.3 support. |
It's been like 4 years. Close it, or merge it or start another repo. |
I'm willing to merge it if somebody rebases it against master (and tests pass). |
@@ -8,6 +8,7 @@ | |||
The `SortingAlgorithms` package provides three sorting algorithms that can be used with Julia's [standard sorting API](http://docs.julialang.org/en/latest/stdlib/sort/): | |||
|
|||
- [HeapSort] – an unstable, general purpose, in-place, O(n log n) comparison sort that works by heapifying an array and repeatedly taking the maximal element from the heap. | |||
- QuickSort3 - an unstable, general purpose, in-place, O(n log n) comparison sort variation of the classic QuickSort that uses a three-way partion algorithm. It can be 1.1x slower than QuickSort in base but works in near O(n) time when there are few unique values in the array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- QuickSort3 - an unstable, general purpose, in-place, O(n log n) comparison sort variation of the classic QuickSort that uses a three-way partion algorithm. It can be 1.1x slower than QuickSort in base but works in near O(n) time when there are few unique values in the array. | |
- QuickSort3 - an unstable, general purpose, in-place, O(n log n) comparison sort variation of the classic QuickSort that uses a three-way partitioning algorithm. It can be 1.1x slower than QuickSort in base but works in near O(n) time when there are few unique values in the array. |
This is basically the
QuickSort
in base with a small change to handle repeated values. It should be less than 1.15x slower than one in base in general but near O(n) time for arrays with few unique keysCC @kmsquire