| ▲ | Altern4tiveAcc an hour ago | |||||||
> SoA is weak if you are adding/removing monsters more often than accessing a single "hot" field. Why is that? Genuinely curious. Does "weak" mean that it performs worse than AoS, or that the gains aren't as significant versus AoS? | ||||||||
| ▲ | tsimionescu 4 minutes ago | parent | next [-] | |||||||
It's because removing a monster with 20 fields from an SoA structure means resizing 20 arrays. Removing the same monster from an AoS array involves resizing a single array, which you're going to process in a very cache friendly way. | ||||||||
| ▲ | jayd16 39 minutes ago | parent | prev [-] | |||||||
Presumably they're referring to resizing the arrays. | ||||||||
| ||||||||