3 ms·
Intrusive linked lists trade away simplicity and ease of refactoring for better memory characteristics. There's a huge amount of code where that trade is a terr
by consilient 3y ago
Intrusive linked lists trade away simplicity and ease of refactoring for better memory characteristics. There's a huge amount of code where that trade is a terrible deal. Obviously you shouldn't use ordinary linked lists deep in the guts of an OS kernel or automated trading system but claiming that they're useless is absurd.
- astrange 3y agoThe main issue is that a list of pointers is inefficient but also overkill; a small list is probably fine as an array even if you're mutating it. But intrusive lists also have clearer ownership, since the object knows all the lists it can be in, and that's handy sometimes.