Programming Languages - Speed of development and Speed of execution
Is programming in Python faster than in C, C++ or Java?
Source: Quora
Andrew Scherpbier, 20+ years of C, C++, Java, C#, Perl, PHP, etc. experienceAuthor has 94 answers and 261.3K answer views6y
Programming, as in writing the code to produce a working program, is faster in Python than the other languages you mention, given that the program you are writing is small (fewer than 10,000 lines.)
However, experience shows that once you start working on larger projects, the static typing of the other languages make programming not only faster but allow much more maintenance type work, like refactoring. This is mostly because static typing catches stupid errors that would normally be avoided if you can keep the whole program “in your head”. Considering that most production programs have large code bases and require lots of maintenance, the advantages of python or other languages like that go essentially away.
If you are a programmer that gets tasked with fixing a bug in a 10,000,000 line program, you’ll need every advantage you can get, and static typing is a pretty big one!
So speed of programming is not really something that should drive choice of language, in general. It should be more based on maintainability and refactorability. Don’t get me wrong, there are plenty of large python, perl, php, javascript, etc. programs. Having been forced/asked to maintain some of these has taught me to stay away from these languages!
Is Python considered slower than other programming languages such as C/C++, Java, and MATLAB? Is speed a significant factor in choosing a programming language?
Source: Quora
Eric Vergnaud, Technologist
It’s not “considered”, it’s actually measured. Pure Python is roughly 30 times slower that C++.
Many calculation intensive Python apps rely on Numpy, which is written in C++, and provides a thin layer for calling it from Python. These apps do not suffer that much from the comparison.
Speed is a very significant factor in many areas: crypto, digital, trading… and it impacts cost, since it requires 30x more computing power. So if you’d need 1,000 servers in C++, now you’d need 30,000.
That said many apps only need a small portion of the computing power of 1 modern server. For these, developing faster at the cost of performance provides better ROI than developing less rapidly to improve performance.