# Understanding the performance and overhead of a vector of SOA vs a vector of AOS for SIMD and the effect of push!

**URL:** <https://discourse.julialang.org/t/understanding-the-performance-and-overhead-of-a-vector-of-soa-vs-a-vector-of-aos-for-simd-and-the-effect-of-push/100560>\
**Category:** Performance\
**Tags:** performance, simd\
**Created:** [June 19, 2023, 12:14pm UTC](https://discourse.julialang.org/t/understanding-the-performance-and-overhead-of-a-vector-of-soa-vs-a-vector-of-aos-for-simd-and-the-effect-of-push/100560 "2023-06-19T12:14:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![f.ij](https://avatars.discourse-cdn.com/v4/letter/f/8491ac/32.png) [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Post date:** [June 23, 2023, 11:13am UTC](https://discourse.julialang.org/t/understanding-the-performance-and-overhead-of-a-vector-of-soa-vs-a-vector-of-aos-for-simd-and-the-effect-of-push/100560/2 "2023-06-23T11:13:23Z")

</div>

My apologies, it seems I have been a bit sloppy. I was trying to write this up quickly and in between a lot of other activities. The first function above, `getEFactor` of course should return the float `efac`. Also, I pushed the latest version of my code, everything should be working immediately. The file code.jl contains all the relevant functions, and the tests can be run after importing that file, which should reproduce my findings directly.

I’m really hoping someone could give me some insight on why there is such a big discrepancy between the performance of the `getEFactor` function and the performance of the actual simulation loop. For high connectivity, most of the time of a single iteration of the loop should be taken by evaluating this function, so I would expect to see a similar performance ratio, which as seen from my results, is not the case at all.

---

_[View the full topic](https://discourse.julialang.org/t/understanding-the-performance-and-overhead-of-a-vector-of-soa-vs-a-vector-of-aos-for-simd-and-the-effect-of-push/100560)._
