Skip to content

Commit 15e9ee1

Browse files
committed
Make it work with older Julia
1 parent 7a89465 commit 15e9ee1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/quicksort.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,10 @@ function choose_pivot(xs, basesize, order)
182182
eq(order, samples[7], samples[8]) &&
183183
eq(order, samples[8], samples[9])
184184
)
185-
pivot, ishomogenous =
186-
refine_pivot_serial(@view(xs[begin:min(end, begin + 127)]), pivot, order)
185+
pivot, ishomogenous = refine_pivot_serial(@view(xs[1:min(end, 128)]), pivot, order)
187186
if ishomogenous
188187
length(xs) <= 128 && return (pivot, true, true)
189-
pivot, ishomogenous =
190-
refine_pivot(@view(xs[begin+128:end]), pivot, basesize, order)
188+
pivot, ishomogenous = refine_pivot(@view(xs[129:end]), pivot, basesize, order)
191189
return (pivot, ishomogenous, true)
192190
end
193191
end

0 commit comments

Comments
 (0)