Debugging performance difference between identical arrays

Thanks for the suggestion. I didn’t know about sizehint!. However, my biggest problem is not with construction of the arrays, but with using them for some algorithm, where I don’t understand how the construction affects the performance. I made a follow up post here:

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

This also goes a bit further than just this topic, but overall is related I think.