4 ms·
Why not just implement this as an array of constant width pointers to the heterogeneous data types?
by MontyCarloHall 4y ago
Why not just implement this as an array of constant width pointers to the heterogeneous data types?
- LorenPechtel 4y agoWhich is what happens in most modern languages. The items in your list are objects--which internally are just pointers to the data. There's no performance penalty for having variable-sized objects in the list.
- di4na 4y agoyou just defined how memory work, you are welcome :)