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

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.