sort
and sortperm
take a couple of keyword arguments that appear to be redundant (at least, one of them is a subset of the other): rev
and order
. That is:
julia> sortperm(a, rev=true) == sortperm(a, order=Base.Order.Reverse)
true
julia> sortperm(a) == sortperm(a, rev=true, order=Base.Order.Reverse)
true
Benchmarking suggests no advantage to one over the other.
Is the idea that a custom sorting algorithm (via order
) can be automatically reversed with the rev
keyword? If not, what is the purpose of having both rev
and order
?