# For-loop over two arrays, sequentially

**URL:** <https://discourse.julialang.org/t/for-loop-over-two-arrays-sequentially/81699>\
**Category:** General Usage\
**Created:** [May 26, 2022, 8:24am UTC](https://discourse.julialang.org/t/for-loop-over-two-arrays-sequentially/81699 "2022-05-26T08:24:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [May 26, 2022, 9:18am UTC](https://discourse.julialang.org/t/for-loop-over-two-arrays-sequentially/81699/4 "2022-05-26T09:18:55Z")

</div>

FWIW, from [this related thread](https://discourse.julialang.org/t/iterating-over-two-vectors-with-vcat-is-faster-than-iterators-flatten-and-catviews/15698), `vcat` allocates but seems to be faster than `Iterators.flatten`.

---

_[View the full topic](https://discourse.julialang.org/t/for-loop-over-two-arrays-sequentially/81699)._
