Help with optimising a simple function

typeof((N1(h, ln, l) * incrCov(ts, 1, h, k, l, K, α) ^ 2 for h = 2:ln - l)) = Base.Generator{UnitRange{Int64}, var"#106#109"{UnitRange{Int64}, Int64, Int64, Int64, Float64}}

The Generator still makes a closure. And the boxes still happen because it might need to access the data originally assigned to k or originally to l wherever k or l are used. The unconditional assignment fixes this by anchoring them into solid locations.

1 Like