3 ms·
Linked lists are not good for cache locality, it has nothing to do with the language. It'd be my advice over linked lists even if you were doing it in C. Rust d
by estebank 5y ago
Linked lists are not good for cache locality, it has nothing to do with the language. It'd be my advice over linked lists even if you were doing it in C. Rust does make doubly linked lists in safe code without reference counting impossible, but I don't the argument that you'd use one due to performance or memory overhead.
- Jensson 5y ago> Linked lists are not good for cache locality That doesn't matter if a solution with good cache locality doesn't exist for your problem.
- deleted 5y ago[deleted]
- gpderetta 5y agoThey are not, that's why you would use a flat layout for your primary iteration order. But for any secondary ordering/indexing you might need, if you also need fast insert/removal, chaining in a list can be an option.