Re:So You Want to Rust the Linux Kernel?
by estebank on Monday October 11, 2021 @09:15AM
(#28827977)
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.
[ Parent
| on HN ]
> 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.
Re:So You Want to Rust the Linux Kernel?
by gpderetta on Monday October 11, 2021 @11:25AM
(#28829390)
They 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.