Skip to content

Commit

Permalink
help type inference for logical indexing (#29633)
Browse files Browse the repository at this point in the history
  • Loading branch information
chethega authored and KristofferC committed Oct 29, 2018
1 parent cd0bd33 commit aa72f72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,10 @@ end
# We're looking for the n-th true element, using iterator r at state i
n = s[1]
n > length(L) && return nothing
#unroll once to help inference, cf issue #29418
idx, i = iterate(tail(s)...)
s = (n+1, s[2], i)
L.mask[idx] && return (idx, s)
while true
idx, i = iterate(tail(s)...)
s = (n+1, s[2], i)
Expand Down

2 comments on commit aa72f72

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.