Uploaded June 2014 | Updated November 2026, 2 days ago
Today we'll look at a very interesting performance programming technique. It is used when programming SIMD, and stream processing hardware, like an SSE capable CPU or the GPU. It involves a perpendicular rotation of data in RAM. It is known as AoS vs. SoA (or SoA vs AoS). It stands for Array of Structures versus Structure of Arrays.
Most of the time we organize our data into structures, then we create arrays of these structures and work on the elements of the array with a loop. We can, however, organize our data into a single structure, which contains a arrays for each element of the previous structure. We are storing exactly the same data, it's just rotated.
The question this tutorial examines is, does rotating our data 90 degrees help performance? Are we able to better utilize the hardware's capabilities if we set out our data a little differently?
The choice of AoS or SoA is one that is easiest made at the start of a project. It is not often convenient to change an existing project from AoS to SoA.
Today we'll look at a very interesting performance programming technique. It is used when programming SIMD, and stream processing hardware, like an SSE capable CPU or the GPU. It involves a perpendicular rotation of data in RAM. It is known as AoS vs. SoA (or SoA vs AoS). It stands for Array of Structures versus Structure of Arrays.
Most of the time we organize our data into structures, then we create arrays of these structures and work on the elements of the array with a loop. We can, however, organize our data into a single structure, which contains a arrays for each element of the previous structure. We are storing exactly the same data, it's just rotated.
The question this tutorial examines is, does rotating our data 90 degrees help performance? Are we able to better utilize the hardware's capabilities if we set out our data a little differently?
The choice of AoS or SoA is one that is easiest made at the start of a project. It is not often convenient to change an existing project from AoS to SoA.









![Object Oriented Programming is a Dirty Rotten Low Down Trick: A Look at How C++ Works
In this video we explore some of the techniques used by compiler authors achieve the mechanisms of Object Oriented languages. It is interesting to see how close C++ is to C, and how simple these mechanisms truly are under the hood. Although the video concentrates on C++, similar techniques are employed by the Java Virtual Machine, the .Net Virtual Machine in C#, and many other OO languages.
0:00 - Introduction
1:29 - Private member variables
6:26 - Member methods
11:38 - Polymorphism, Virtual Functions
[OO] is a dirty rotten low down trick is a quote by by Dr. Michael Brady from the lecture:
Microprocessor Systems Lecture 1: https://www.youtube.com/watch?v=eG3Vg_EZTYk
Support Whats a Creel? on Patreon: https://www.patreon.com/whatsacreel
FaceBook: https://www.facebook.com/whatsacreel/
Background images from HDRI Haven: https://hdrihaven.com/
Software used to make this vid: Visual Studio 2019 Community: https://www.visualstudio.com/downloads/
Blender: https://www.blender.org/
Audacity: https://www.audacityteam.org/
Davinci Resolve 16: https://www.blackmagicdesign.com/products/davinciresolve/
OpenOffice: https://www.openoffice.org/
Gimp: https://www.gimp.org/ Object Oriented Programming is a Dirty Rotten Low Down Trick: A Look at How C++ Works](https://i.ytimg.com/vi/HClSfuT2bFA/mqdefault.jpg)
