by Thaxll · 7y ago · 0 comments
- C library everywhere ( network, serialization ... )
- server that manages process ect ...
At some point if you need that kind of things just pickup a language that does it out of the box.
I view this as a strong benefit in python. Write your app, and if you need to really squeeze performance in some critical area, writing a C/C++ extension is simple enough.
So, if we can use it, take advantage of its benefits and have tools like this that simplify everything without too many constraints, I would say it's a good tradeoff.
This is such a terrible state of affairs. There are so many times I've wanted to generate synthetic training data efficiently and iterate in a tight training loop where I've gone back and forth endlessly between trying to get Python to be fast and trying to get the training part to work in another language.
If it's IO, check asyncio tools. E.g. aiofiles.
In the grand landscape of programming language performance, it tops out at middling on practical code.
If we wanted to have the absolute best performance, we would have to write web apps in C. But it would be quite more cumbersome.
PyPy is a solution to "my Python code is running slowly". For very little effort you can obtain a very cheap speedup. It may not be all you need, but it's very engineer-effort cheap. But it certainly isn't a solution to "my Python code is running slowly but I need it to run at C speeds", and there are a ton of other solutions to the problem "My Python code is running slowly", since Python is such a slow language on its own terms. (By contrast, "my C code is running slowly and I've already profiled it a lot, etc." is a huge problem.)