11 ms·
Feels like a language with opaque enums and pattern matching could implement this kind of thing behind the scenes.
by foota 3y ago
Feels like a language with opaque enums and pattern matching could implement this kind of thing behind the scenes.
- kazinator 3y agoOnce you assign the values in the C enum, a switch statement is "opaque". Just inefficient; a jump table optimization is impossible on the values. Speed is sacrificed for security. A jump table itself could be row-hammered to jump where the attacker wants!