As a result of this question from a few days ago there are a few things that have been bugging me about the complexity requirements for std::deque::push_back/push_fron
I suspect that the reallocation of the block pointers is done with a geometrically increasing size - this is a common trick for std::vector. I think this is technically O(log m) but as you point out m << n, so as a practical matter it doesn't affect the real-world results.