-
Notifications
You must be signed in to change notification settings - Fork 57
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
Release 1.8.1 #173
Merged
Release 1.8.1 #173
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was in a bit of a rush because I wanted to finally release that version 1.8.0, to the point that I forgot to update the metadata...
As mentioned in the documentation, quick_merge_sorter can handle forward iterators, not only random-access iterators.
Median-of-9 pivot selection takes 9 samples in a collection, takes the medians of the 3 sets of 3 samples, then takes the median of those three medians. Our implementation incorrectly picked two correct medians and a value that wasn't a median for the last triplet of samples. This is now fixed with this commit. How it affects the speed of the quicksort family of algorithms is unclear. It might make a difference for specific patterns.
I had not realize that std::partition performed O(n log n) swaps for forward iterators, which brings the complexity of quick_sort and quick_merge_sort down to O(n log² n) for those iterators. [ci skip]
- Add a small section about quick_merge_sort - Fix the section about the best-known comparison sort complexities - Include vergesort actual complexity and improved complexity for bidirectional iterators - Mention that vergesort can be made stable if needed [ci skip]
The new bound for the std::vector::reserve() in poplar_sort comes from the analysis performed by Harvey & Zatloukal in their work about the post-order heap. This should ensure that the poplars vector only ever performs a single memory allocation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.