The advantage of a deque is a relatively low worst case push_back. When you have a 1,000,000 item vector, and you need to push_back the 1,000,001st item, the reallocation is going to hurt... a lot.

They are just two different containers, they resemble each other, but at the end of the day, there are just too many considerations give you a clear cut answer.

Both vector and deque offer pretty good push_back performance. Vector seems to have a pretty good overall average case, but a bad worst case, whereas deque have an alright worst case.

Something else to consider is that deques never re-allocate. Objects are never copied around.

...

Oh yeah, push_front.

...

Personally, I usually stick with vectors, because I never need push_front, and enjoy the pointer/iterator compatibility, and the C-array style compatibility. And I'm more fluent in vector.