Skip to content

Commit

Permalink
Use in-place sort
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Jun 10, 2016
1 parent 60aae00 commit 0059be7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,9 @@ sort(v::AbstractVector; kws...) = sort!(copymutable(v); kws...)

## other iterables and fallback ##

sort(s::String; kws...) = String(sort(collect(s); kws...))
sort(s::String; kws...) = String(sort!(collect(s); kws...))
sort(n::Number) = throw(MethodError(sort, n))
sort(itr; kws...) = sort(collect(itr); kws...)
sort(itr; kws...) = sort!(collect(itr); kws...)


## selectperm: the permutation to sort the first k elements of an array ##
Expand Down

0 comments on commit 0059be7

Please sign in to comment.