Why wouldn't you use full optimisation for a release build? Of course you're going to use -O2... and looking at performance in a debug build is just meaningless... debug builds are for stepping through code and debugging it...
That's not a debug build, that's just unoptimized. Debug builds include stabs, extra nametable info, etc, none of which the -O0 builds include. -O0 just means that there is no optimization performed by the compiler - how your code is written, is how it will run.
Yes, you will make a production build at -O2 or potentially even higher, and when you do that, you'll get near-C levels of performance. But that's not the point. The point is that the containers perform terribly until the compiler gets its hands on them and optimizes them; why? There's no obvious reason for it, not when C and glib are smoking it by orders of magnitude. RTTI and dynamic dispatch can't account for all of the slowness there - the C++ STL containers just aren't written for performance from the get-go.
Just realized we're jacking OP's thread, can make a separate thread re: STL performance if we want to keep talking about this.