Hacker News new | ask | show | jobs
by munksbeer 315 days ago
So, in option two, you'd be using SoA with a

  double health[];
which is the value that would be updated by healthEntity.updateHealth() ? So because you're sequentially updating only that attribute it should lend itself to being cache friendly and potentially prefetch prediction? (can't remember the term)
1 comments

Yes, exactly. If you have to update everyone's health (you do) and the updates are pretty much the same (they are), then things don't get any more cache friendly than this.