Skip to content

Commit 6a6a6c8

Browse files
m-filaMoelf
andauthored
slice dij
Co-authored-by: Jerry Ling <[email protected]>
1 parent 353f023 commit 6a6a6c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ array. The use of `@turbo` macro gives a significant performance boost.
147147
- `best`: The index of the minimum value in the `dij` array.
148148
"""
149149
fast_findmin(dij, n) = begin
150-
x = @fastmath foldl(min, dij)
150+
x = @fastmath foldl(min, @view(dij[begin:n]))
151151
i = findfirst(==(x), dij)::Int
152152
x, i
153153
end

0 commit comments

Comments
 (0)