Skip to content

Commit d707ae6

Browse files
committed
performance improvement in sorting data in some cases
1 parent 635a3f4 commit d707ae6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sort/sortperm.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ function fast_sortperm_int_threaded!(x, original_P, copy_P, ranges, rangelen, mi
4545
end
4646
cnt = 1
4747
flag = false
48+
#Threads@threads now does not keep the order of the runs, we help starts be sorted before shaping ranges
49+
sort!(starts, by=x->x[1])
4850
@inbounds for i in 1:length(starts)
4951
for j in 1:length(starts[i])
5052
ranges[cnt] = starts[i][j]

0 commit comments

Comments
 (0)