# Code stability with for loop

**URL:** <https://discourse.julialang.org/t/code-stability-with-for-loop/31509>\
**Category:** New to Julia\
**Created:** [November 25, 2019, 10:14pm UTC](https://discourse.julialang.org/t/code-stability-with-for-loop/31509 "2019-11-25T22:14:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bashonubuntu](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Post date:** [November 25, 2019, 10:31pm UTC](https://discourse.julialang.org/t/code-stability-with-for-loop/31509/2 "2019-11-25T22:31:17Z")

</div>

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](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?](https://discourse.julialang.org/t/how-to-prevent-type-instability-in-for-loops/30508). To quote from the first reply, “(such type instabilities) is a consequence of the [iterator interface](https://docs.julialang.org/en/latest/manual/interfaces/#) 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)”

---

_[View the full topic](https://discourse.julialang.org/t/code-stability-with-for-loop/31509)._
