Skip to content

Since you have Timsort in there, would you maybe also be interested in peeksort and powersort? #217

@JobLeonard

Description

@JobLeonard

Given how interested you clearly are in sorting algorithms I would not be surprised if you are probably aware of these algorithms, but a quick search didn't show anything in the repo so that's why I'm mentioning it them

https://www.wild-inter.net/publications/munro-wild-2018

The TL;DR is that there is a bug in Timsort's merging rules, and provably fixing them lead to two new algorithms: peeksort and powersort. Powersort has recently been picked to replace Timsort in Python.

Here is Sebastian Wild, one of the authors of the paper introducing the algorithms, giving a presentation about it at PyCon US 2023:

https://www.youtube.com/watch?v=XjOnY-OLAPc

There is also multi-way powersort: https://www.wild-inter.net/publications/cawley-gelling-nebel-smith-wild-2023.pdf

Anyway, just bringing it to your attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions