Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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/#/overv...



> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: