|
|
|
|
|
by Lev1a
2537 days ago
|
|
Seriously, what is this fascination with linked lists? In comparison to array-based lists they're:
- less memory-efficient,
- do not allow random-access,
- worse for cache locality (so can be up to orders of magnitude slower) and
- more complex. They are nice to learn some principles in the context of an Intro to FP course but apart from that, meh. |
|
Almost any kind of data structure in Rust is extremely painful to do efficiently. You either go the unsafe route of you drowned in a sea of boxes and cells.
On Reddit recently somebody gave the ludicrous claim that you shouldn't have to write your own data structures in rust - the rust system library should have everything you need.