3 ms·
see also: Richard Fabian's data-oriented design book -- the chapter on existential processing discusses enums https://www.dataorienteddesign.com/dodbook/node4.
by shoo 2y ago
see also: Richard Fabian's data-oriented design book -- the chapter on existential processing discusses enums
https://www.dataorienteddesign.com/dodbook/node4.html https://www.dataorienteddesign.com/dodbook/node4.html
Rough idea: model everything as relational data - define 1 table for each state. membership of a record in the table corresponding to state X implies that record is in the given state X.
> the reason why you would put an enum in table form, is to reduce control flow impact. Given this, it's when we aren't using the enumerations to control instruction flow that it's fine to leave them alone
An example of the latter might be some kind of state machine, where you can write branch-free code to determine the successor state from current state, and no other processing needs to branch on the state tag.