# Struct of Arrays (SoA) vs Array of Structs (AoS)

**URL:** <https://discourse.julialang.org/t/struct-of-arrays-soa-vs-array-of-structs-aos/30015>\
**Category:** Performance\
**Tags:** performance\
**Created:** [October 17, 2019, 8:34am UTC](https://discourse.julialang.org/t/struct-of-arrays-soa-vs-array-of-structs-aos/30015 "2019-10-17T08:34:57Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 17, 2019, 12:33pm UTC](https://discourse.julialang.org/t/struct-of-arrays-soa-vs-array-of-structs-aos/30015/7 "2019-10-17T12:33:37Z")

</div>

> [@e3c6](#):
>
> arrSoA = ComplexSoA(rand(100),rand(1000))

Should be `rand(1000)` there?

---

_[View the full topic](https://discourse.julialang.org/t/struct-of-arrays-soa-vs-array-of-structs-aos/30015)._
