Timeline for answer to How do I organize members in a struct to waste the least space on alignment? by user3124812
Current License: CC BY-SA 4.0
Post Revisions
2 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 16, 2019 at 11:50 | comment | added | Peter Cordes | This is much better when SIMD is possible. But when you need scattered / random access to structs (and need multiple members of the same struct, but not anything from nearby structs) SoA costs you 3x the cache misses. It also costs you more pointers/registers, especially for non-CISC and/or non-static allocation. But if SIMD is an option for any of your loops then yes it's usually much better to have SoA. | |
| Jun 28, 2019 at 2:06 | history | answered | user3124812 | CC BY-SA 4.0 |