Skip to content

Commit

Permalink
Make it work with older Julia
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Dec 23, 2021
1 parent 7a89465 commit 16389ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/quicksort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ function choose_pivot(xs, basesize, order)
eq(order, samples[7], samples[8]) &&
eq(order, samples[8], samples[9])
)
pivot, ishomogenous =
refine_pivot_serial(@view(xs[begin:min(end, begin + 127)]), pivot, order)
pivot, ishomogenous = refine_pivot_serial(@view(xs[1:min(end, 128)]), pivot, order)
if ishomogenous
length(xs) <= 128 && return (pivot, true, true)
pivot, ishomogenous =
Expand Down

0 comments on commit 16389ad

Please sign in to comment.