News for hackers. Stuff that matters.
Re:The true cost of linked lists by di4na on Monday June 06, 2022 @07:59AM (#31639358)
Anytime you do something that is immutable with probable change somewhere inside that is not easy to handle with far mor complex datastructure. In particular linked list are great for heterogeneous cells type.

Vectors and arrays have the problem of needing contiguous memory. If an inner cell can have different size, or worse change it mid work, things get ugly really fast.

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 :)