Taking information “out-of-band”

Over in Intro to Data Oriented Design for Games, Nic Barker explains “taking information out-of-band”. Nic credits Andrew Kelly of Zig fame for introducing him to the idea (see Andrew Kelley Practical Data Oriented Design (DoD)).

The basic idea is that instead of having one list with items that have an enumeration with three different states, you can have three lists where membership implies the enum state, obviating the need to store the enum value in the item anymore, thus saving space and improving cache locality.