4 ms·
> invert the normal array-of-structs to a struct of arrays We need our languages and compilers to give us the necessary tools to abstract away complexity witho
by dsego 4y ago
> invert the normal array-of-structs to a struct of arrays
We need our languages and compilers to give us the necessary tools to abstract away complexity without losing performance, which our current OOP languages don't really do.
Jai for example offers a special keyword, so the code is written one way (AOS) but the memory layout is converted into SOA.
https://pixeldroid.com/jailang/overview/Features/SOA/#/overview/ https://pixeldroid.com/jailang/overview/Features/SOA/#/overv...
- Measter 4y ago> Jai for example offers a special keyword, so the code is written one way (AOS) but the memory layout is converted into SOA. I believe Zig has a stdlib function that allows you to do this, and I'm pretty sure there's also a Rust crate that provides a proc macro for it.