Skip to content

Conversation

@xiaodaigh
Copy link

This is to open the door for specialized algorithms for sortperm e.g. sortperm for Radixsort see JuliaCollections/SortingAlgorithms.jl#25

This is to open the door for specialized algorithms for sortperm e.g. sortperm for Radixsort see JuliaCollections/SortingAlgorithms.jl#25
@nalimilan
Copy link
Member

Why do you need this for sortperm but not for sort? Can't you take the same approach as existing code in SortingAlgorithms does with sort!, i.e. override sortperm!?

@xiaodaigh
Copy link
Author

xiaodaigh commented Nov 25, 2017

@nalimilan sort(v, alg = RadixSort) is already working hence no need to change. But sortperm(v, alg = RadixSort) is really slow as it's still using the sortperm in Base not on a specialized algorithm. Both Base.sortperm and Base.sortperm! reduces to using sort!, which in the case of Radixsort (at least) is not the optimal way to sortperm, as can be shown in my PR to SortingAlgorithms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants