Zig NEWS

Discussion on: Struct of Arrays (SoA) in Zig? Easy & in Userland!

Collapse
 
kristoff profile image
Loris Cro

The interface is meant to give you syntax sugar to make it feel like an AoS list, but internally it’s stored in SoA form. You might think that it’s not SoA because you see a single array of bytes in the MultiArrayList implementation, but that’s the chunk of memory that holds all the per-field arrays.

Thread Thread
 
zargio profile image
PiergiorgioZagaria

Re-read the documentation and I was wrong on how I thought it worked, I blame the fact that I read it on a phone lol. Anyways thanks for the clarification