Skip to content

Consider using default sorting algorithm with partition.sort_values function #204

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

Closed
sarahyurick opened this issue Jul 30, 2021 · 2 comments

Comments

@sarahyurick
Copy link
Collaborator

sarahyurick commented Jul 30, 2021

Hi, I was wondering if there is a reason behind kind="mergesort" being used in sort.py:

        partition = partition.sort_values(
            by=[col], ascending=asc, na_position=na_position, kind="mergesort"
        )

instead of not specifying the kind parameter and using the default quicksort? There also does not appear to be a way to override this.

@nils-braun
Copy link
Collaborator

Hi @sarahyurick - thanks for your question! Yes, there was a reason behind this indeed. It is described a few lines above the code you pasted and is basically a speed improvement when we have multiple columns (referencing this pandas issue).
Do you see any performance degrading? I would be very interested to learn about that!

@sarahyurick
Copy link
Collaborator Author

Thanks for the response! I was mostly just curious - I haven't compared Pandas' mergesort versus quicksort performance before.

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

No branches or pull requests

2 participants