12 ms·
If you’re always accessing all the members then no. SoA shines when you want to access a different set of a few members of a struct in different contexts. Then
by meheleventyone 3y ago
If you’re always accessing all the members then no. SoA shines when you want to access a different set of a few members of a struct in different contexts. Then there’s also the option of building temporary arrays of just the data you need then spinning through it which can be faster for some things. For example rendering pipelines. Even more so if you cache the results and can use them next frame due to temporal locality. There’s no silver bullet you’ve got to sit down and look at your access patterns and profile.