(no title)
shadowmint | 6 years ago
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.
evgen|6 years ago
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.
shadowmint|6 years ago
We certainly shipped (using django) and it was certainly slow, and remains a painfully slow very successful enterprise app.
I’m not arguing that the slowness is deal breaking, but it is slow, and it does, routinely, break the SLAs its supposed to meet.
So... unusably slow? no.
...but slow? yes, it really is.
imo. your milage may vary. /shrug
HelloNurse|6 years ago
If there are performance issues, rewriting part of a Python application in C is much less likely than refactoring it, without using other languages, to use an existing high performance library.
Application-specific Python extensions are usually intended to allow scripting of the application, with little concern for Python performance (which is the same as doing the same thing without scripting).
New foreign language Python extensions are usually found in new Python libraries, to make existing proven C or C++ libraries available to Python applications or to improve on existing Python libraries.
fmhul|6 years ago
polotics|6 years ago