Code stability with for loop

That’s nothing to worry about. The link below may be helpful

https://docs.julialang.org/en/v1/manual/performance-tips/index.html#man-code-warntype-1

Basically, the yellow colored warnings are typically low-priority “type instabilities”. The reply here addresses your question too How to prevent type instability in for loops?. To quote from the first reply, “(such type instabilities) is a consequence of the iterator interface which returns nothing when the end of the iterator is reached. Note that the line you cited from the @code_warntype output is colored in yellow (not red, which indicates “true” type instabilities)”

4 Likes