| Lovely theory, but in practice it works more like this: 1) write everything in python because its easy and quick to do so. 2) its slow as. 3) abandon software and write it in something else, or, live on with slow ass software and blame python for being slow and rubbish forever more. re-writing python in c is a hideously painful process, and its proven to be very unsuccessful practically. Writing new code in c/c++/whatever and exposing a python api is where successful projects like numpy and tensorflow live. python is very good at what it is, but no one is ever going to go and rewrite your python code in c to make it faster; its just going to be slow forever. |
1) write everything in python
2) yeah, the performance here is good enough so ship it
3) there is no 3
There are very few situations where performance is going to be an issue for you where there is not an existing C module solution that will solve the problem for you. The tired old 'python is slow' trope is getting more and more irrelevant every day. There are other aspects of the language that may make it a mediocre solution to the problem at hand, but out in the real world most people are simply getting the job done with python.