The SoA Vector – Part 1: Optimizing the Traversal of a Collection--Sidney Congard
It's all for speed.
The SoA Vector – Part 1: Optimizing the Traversal of a Collection
by Sidney Congard
From the article:
I like C++ because it offers a good compromise between writing expressive and fast code. But, I discovered a problem where I didn’t know any way to hide the implementation detail away from its use: The “Structure of Arrays” (SoA) versus the “Array of Structures” (AoS) problem.
This is the first part of a series of two articles:
- what ‘SoA’ is about and what benefits it brings (part 1)
- how to implement an SoA vector in C++ (part 2)
So let’s see what those SoA and AoS are all about...

 C++Now 2019 will be held in Aspen, May 5–10, 2017.
C++Now 2019 will be held in Aspen, May 5–10, 2017. ACCU’s Overload journal of December 2018 is out. It contains the following C++ related articles.
ACCU’s Overload journal of December 2018 is out. It contains the following C++ related articles.