January 2019
Intermediate to advanced
316 pages
8h 8m
English
Vec<T> and VecDeque<T> both build on a heap-allocated array, and perform very well on insert and find operations, thanks to the elimination of several steps. However, the dynamic array implementation from earlier in the book can actually hold its own against these.
The doubly-linked list implemented previously does not look good against the LinkedList<T> provided by std::collections, which is built far simpler and does not use RefCells that do runtime borrow checking:

Clearly, if you need a linked list, do not implement it yourself, std::collections::LinkedList<T> is excellent as far as linked lists go. Commonly, Vec<T> will perform ...