Skip to content
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
merged 16 commits into from
Oct 25, 2020
Merged

Release 1.8.1 #173

merged 16 commits into from
Oct 25, 2020

Conversation

Morwenn
Copy link
Owner

@Morwenn Morwenn commented Oct 25, 2020

No description provided.

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.
@Morwenn Morwenn merged commit 432511a into master Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant