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

Improve sort performance #2455

Open
xiaodaigh opened this issue Sep 26, 2020 · 3 comments
Open

Improve sort performance #2455

xiaodaigh opened this issue Sep 26, 2020 · 3 comments
Labels
non-breaking The proposed change is not breaking performance
Milestone

Comments

@xiaodaigh
Copy link
Contributor

xiaodaigh commented Sep 26, 2020

In DataConvenience.jl I tried out a radixsort based sorting approach and I found there is still some performance gain to be had in the sorting

https://github.com/xiaodaigh/DataConvenience.jl#faster-sorting-for-dataframes

image

The implementation is quite simple. I just use the sorttwo! function in SortingLab.jl to sort the sorting columns using radixsort and then apply the sorted indices to the rest of the columns.

@bkamins bkamins added non-breaking The proposed change is not breaking performance labels Sep 26, 2020
@bkamins bkamins added this to the 1.x milestone Sep 26, 2020
@nalimilan
Copy link
Member

Feel free to make a PR to use radix sort, but first this should be upstreamed to SortingAlgorithms to avoid adding too many dependencies to DataFrames. Does fsort implement things that JuliaCollections/SortingAlgorithms.jl#33 doesn't cover?

@xiaodaigh
Copy link
Contributor Author

I should really have another go at getting things into SortingAlgorithms.jl.

SortingLab.jl has string sort.

I would say, another approach is to have a Radixsort.jl and clean up the radix sort interface there majorly. Cos we really only need radixsort anyway.

@bkamins
Copy link
Member

bkamins commented Oct 2, 2020

Great. Thank you for all the work.

I think it is essential to have all the best possible algorithms in SortingAlgorithms.jl and this is a dependency that DataFrames.jl takes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-breaking The proposed change is not breaking performance
Projects
None yet
Development

No branches or pull requests

3 participants