3 ms·
Even then, linked lists are only faster than arrays if the list has at least 100s of items.
by twanvl 8y ago
Even then, linked lists are only faster than arrays if the list has at least 100s of items.
- geezerjay 8y agoThat's pretty much a standard use case. IIRC the rule of thumb is that if the container isn't expected to hold many elements then the default choice is to use std::vector no questions asked. Otherwise, random insertions and deletions in a sizable container requires a std::list.