# Type stability on Arrays of Arrays in nested for loops?

**URL:** <https://discourse.julialang.org/t/type-stability-on-arrays-of-arrays-in-nested-for-loops/55619>\
**Category:** Performance\
**Tags:** question, arrays, type-stability\
**Created:** [February 19, 2021, 2:31pm UTC](https://discourse.julialang.org/t/type-stability-on-arrays-of-arrays-in-nested-for-loops/55619 "2021-02-19T14:31:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [February 19, 2021, 2:57pm UTC](https://discourse.julialang.org/t/type-stability-on-arrays-of-arrays-in-nested-for-loops/55619/2 "2021-02-19T14:57:41Z")

</div>

> [@How to prevent type instability in for loops?](https://discourse.julialang.org/t/how-to-prevent-type-instability-in-for-loops/30508/2):
>
> AFAIU, this “type instability” is harmless. It 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/type-stability-on-arrays-of-arrays-in-nested-for-loops/55619)._
