Hacker News new | past | comments | ask | show | jobs | submit login

it depends on the access pattern. If you are performing an operation where you need to access every field on each object, then yes you'd be better off with array of structs. But at least in games, it seems more common that you'd need to e.g. get just the x-y coords of every monster, in which case struct-of-arrays is better.



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

Search: