Skip to content

Commit e61902f

Browse files
committed
put back update defalg after bootstrapping (ugly)
1 parent 447300b commit e61902f

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

base/Base.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@ include("util.jl")
398398

399399
include("asyncmap.jl")
400400

401+
Sort.defalg(v::AbstractArray) = DEFAULT_STABLE
402+
Sort.defalg(v::AbstractArray{<:Union{Number, Missing}}) = DEFAULT_UNSTABLE
403+
Sort.defalg(v::AbstractArray{Missing}) = DEFAULT_UNSTABLE
404+
Sort.defalg(v::AbstractArray{Union{}}) = DEFAULT_UNSTABLE
405+
401406
# deprecated functions
402407
include("deprecated.jl")
403408

base/sort.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ Characteristics:
512512
"""
513513
const MergeSort = MergeSortAlg()
514514

515-
const DEFAULT_UNSTABLE = QuickSort
516-
const DEFAULT_STABLE = MergeSort
515+
const DEFAULT_UNSTABLE = RadixSort(QuickSort)
516+
const DEFAULT_STABLE = RadixSort(MergeSort)
517517
const SMALL_ALGORITHM = InsertionSort
518518
const SMALL_THRESHOLD = 20
519519

@@ -751,10 +751,10 @@ end
751751

752752
## generic sorting methods ##
753753

754-
defalg(v::AbstractArray) = DEFAULT_STABLE
755-
defalg(v::AbstractArray{<:Union{Number, Missing}}) = DEFAULT_UNSTABLE
756-
defalg(v::AbstractArray{Missing}) = DEFAULT_UNSTABLE
757-
defalg(v::AbstractArray{Union{}}) = DEFAULT_UNSTABLE
754+
defalg(v::AbstractArray) = MergeSort
755+
defalg(v::AbstractArray{<:Union{Number, Missing}}) = QuickSort
756+
defalg(v::AbstractArray{Missing}) = QuickSort
757+
defalg(v::AbstractArray{Union{}}) = QuickSort
758758

759759
function sort!(v::AbstractVector, alg::Algorithm, order::Ordering)
760760
inds = axes(v,1)

0 commit comments

Comments
 (0)