I think you are reading these statistics incorrectly. They show that Python is about 400 times slower than C ++, and, with one exception, Python is more like memory. When it comes to source size, Python wins.
My experiences with Python show the same definite tendency that Python is in the order of 10 to 100 times slower than C ++ when doing any serious crunch. There are many reasons for this, the main of which are: a) Python is interpreted, and C ++ is compiled; b) Python has no primitives, everything, including built-in types (int, float, etc.), are objects; c) the Python list can contain objects of various types, so each entry must store additional data about its type. All this seriously complicates both the operating time and memory consumption.
This is no reason to ignore Python. Many programs do not require much time or memory, even with a 100-fold time factor. Development cost is where Python wins with a simple and concise style. This improvement in development cost often outweighs the cost of additional processor and memory resources. However, when this is not the case, C ++ wins.
marcog Apr 29 '09 at 9:55 2009-04-29 09:55
source share