Care to demonstrate why? I have the same experience
in general, inserting and removing elements from a vector requires a memory copying.
There are programming languages that have linked lists as their fundamental data structure, like Lisp and Erlang.
For situations where I don't need random access, linked lists are hard to beat.
Linked lists also make wonderful immutable data structures.
linked lists have wonderful filter and flatmap performance. how much memory copying would a vector require?
And actually this logic extends to other algorithms too. My rule of thumb is that a linear search (despite being O(n)) will be faster up to around n=100 than binary search (which is O(log n)) just due to the way the CPU operates.