My problem: I\'ve found that processing large data sets with raw C++ using the STL map and vector can often be considerably faster (and with lower memory footprint) than usi
There is no way to get native Python lists/dicts up to the speed of a C++ map/vector or even anywhere close. It has nothing to do with allocation or type declaration but rather paying the interpreter overhead. The example you mention (numpy) is a C extension and is written in C for precisely this reason.