3 ms·
Linked lists are necessary when you have structures that can't be moved. Very important in a highly concurrent or lockfree environment.
by otabdeveloper4 3y ago
Linked lists are necessary when you have structures that can't be moved. Very important in a highly concurrent or lockfree environment.
- boxed 3y agoCan't you have a list of pointers instead?
- iudqnolq 3y agoHow could you use the Rust standard library's linked list for that?
- KerrAvon 3y agoA deque will usually work just as well in that environment and it will always have better general performance characteristics. There are very few legitimate uses of linked lists.
- deleted 3y ago[deleted]
- otabdeveloper4 3y agoA deque is a doubly-linked list under the hood.
- adgjlsfhk1 3y agoArray based deques are very common (and usually much faster). Doubly linked lists are absolutely awful for memory locality.