In C (or C ++), you have fine-grained control over the exact size of each data structure. You also have the option of small-scale memory management. In the end, you can extend the method new, use it mallocdirectly, and otherwise structure the memory to create spatial locality.
In most dynamic languages (like Python), you have no control over the exact size of anything, much less its location.
In Python, you may have temporary locality, but you have little or no spatial locality.
memoization . , , memoization ( ) .
, C ++ , , . memoization .
http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize