Skip to content

Commit 7b4f68e

Browse files
committed
Move length(expr.args) out of loop
1 parent dfb9b8d commit 7b4f68e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vectorizationbase_compat/contract_pass.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ end
208208
# contract_pass(x) = x # x will probably be a symbol
209209
function contract_pass!(expr::Expr, mod = nothing)
210210
i = Core.ifelse(expr.head === :for, 1, 0)
211-
while i < length(expr.args)
211+
Nexpr = length(expr.args)
212+
while i < Nexpr
212213
_ex = expr.args[(i+=1)]
213214
_ex isa Expr || continue
214215
ex::Expr = _ex

0 commit comments

Comments
 (0)