|
|
|
|
|
by cmrdporcupine
1221 days ago
|
|
It's also just generally not a wise structure to be making or using in applications level development at this point. Vectors will outperform them most of the time, are more cache friendly, and easier to write these days. And Rust has already done the work of building collections you can already use, including some that can be used no-std in embedded/baremetal environments. And if you really need a linked-list type structure, and are competent to make it and use it properly/safely, unsafe {} is waiting for you. |
|
Specifically, linked lists do well when objects are: 1. Large, specifically 100s of bytes 2. Moved frequently between collections 3. Intrusively linked (meaning that the pointers are part of the struct, not a separate library) and 4. Never randomly accessed
One size does not fit all when it comes to performance of list structures, unfortunately. In particular, large items tend to break standard library structures, since they are not the usual case.