Hacker News new | ask | show | jobs
by twanvl 2904 days ago
Even then, linked lists are only faster than arrays if the list has at least 100s of items.
1 comments

That'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.