All challenges
Multiple ChoiceBeginner 45s

AoS vs SoA cache-friendly layout

You iterate millions of particles but only read the x coordinate. Which layout typically performs best?
Options
  1. 1AoS: array of structs with all fields interleaved
  2. 2A linked list of particle nodes
  3. 3A map keyed by particle id
  4. 4SoA: separate contiguous array of x values

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle