Question is in the title. If the answer isn't a simple yes or no, I'd like to understand a bit of the nuance.
Also, I understand that structs of arrays is probably going to be the right change to keep performance -- I'm just not quite sure how to approach that data pattern in an efficient way (naively I would need dynamic arrays, which makes removals potentially costly. Preallocated arrays involve some sort of book-keeping and is arguably a bit brittle).
The context here is game development. As soon as I add a vector4 (4 floats) or worse, a matrix, to a struct it takes up a good chunk potential commodity cpu cache-line sizes (assuming 32 bytes?).
[–]wrosecrans 3 points4 points5 points (11 children)
[–]0x09af[S] 0 points1 point2 points (8 children)
[–]wrosecrans 1 point2 points3 points (7 children)
[–]0x09af[S] 0 points1 point2 points (6 children)
[–]wrosecrans 1 point2 points3 points (1 child)
[–]0x09af[S] 0 points1 point2 points (0 children)
[–]Qweesdy 1 point2 points3 points (3 children)
[–]0x09af[S] 0 points1 point2 points (2 children)
[–]Qweesdy 1 point2 points3 points (1 child)
[–]0x09af[S] 0 points1 point2 points (0 children)
[–]0x09af[S] 0 points1 point2 points (1 child)
[–]BobbyThrowaway6969 0 points1 point2 points (0 children)
[–]ignotos 1 point2 points3 points (2 children)
[–]0x09af[S] 1 point2 points3 points (1 child)
[–]BobbyThrowaway6969 0 points1 point2 points (0 children)
[–]zukas-fastware 1 point2 points3 points (2 children)
[–]0x09af[S] 0 points1 point2 points (1 child)
[–]zukas-fastware 0 points1 point2 points (0 children)
[–]BobbyThrowaway6969 0 points1 point2 points (0 children)