News for hackers. Stuff that matters.
Re:The true cost of linked lists by MontyCarloHall on Monday June 06, 2022 @08:12AM (#31639476)
Why not just implement this as an array of constant width pointers to the heterogeneous data types?
Re:The true cost of linked lists by LorenPechtel on Monday June 06, 2022 @01:09PM (#31643029)
Which 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.
Re:The true cost of linked lists by di4na on Tuesday June 07, 2022 @05:34AM (#31651808)
you just defined how memory work, you are welcome :)