STL is anything but object-oriented; Stepanov is one of the greatest critics of OO. Also, STL goes to great lengths to resolve everything at compile-time through, e.g., tag dispatch. No indirect calls are involved unless you introduce them yourself. Bounds-checking may be enabled in debug-mode in some implementations, but it can always be disabled, and ways of doing so are well-documented.
The JVM optimizes this by using (P)ICs, which are faster than regular vtables.
Well, he said he's used the STL for professionally 6 months, so he's a raw beginner by his own admission.
[1] http://morepypy.blogspot.com/2011/08/pypy-is-faster-than-c-a...
And no, the article does not say that Python was performing faster than the STL. In the first sentence in the "What I Built" section, "Using C, I wrote a handful of lines of C code that took a sorted sequence of 4-byte integers that represented a Twitter user's followers, and I intersected that sequence against thousands of other similar sequences for other Twitter users." I mention C twice, despite it being awful grammar. I wanted to make it clear up front that this wasn't a "Python vs. X" post.
a) How can you make standard-OOP-like method dispatch
faster than vtables?
He doesn't claim you can: he just points out that it still adds overhead.If you don't use polymorphism, you don't need virtual member functions, in which case you don't pay the cost of a vtable.
This is one of the key tenets of C++: You pay for what you use, and only what you use.
This fragment made me WTF, so either I missed something in the C++ development of last few years, or...
a) How can you make standard-OOP-like method dispatch faster than vtables?
b) Since when STL uses so much of virtual functions anyway? Last time I checked, it avoided any kind of polymorphism at all, for speed reasons. (and it doesn't really need to use much; C++ templates are nice tools that can make a pointer to function and a function object work in the same place just because you can stick "()" to the right of the passed parameter and it will compile, no run-time work needed).
c) (it seems to be implied, though not explicitly stated). Going faster than STL... in Python?