2 ms·
> Python programs that do close to nothing still use way more CPU than you would if you were running in the JVM, or Go, C, whatever. Yeah but that's not exactl
by nodamage 7y ago
> Python programs that do close to nothing still use way more CPU than you would if you were running in the JVM, or Go, C, whatever.
Yeah but that's not exactly shocking news to anyone, is it? People generally choose Python for other reasons (productivity, library ecosystem, etc.) because the performance is "good enough" for most web apps, and if you reach a traffic level where performance becomes an issue that's a good problem that you can optimize for later. (Like Facebook did with PHP, Twitter did with Ruby, etc.)
> But yes, most importantly, Python's asyncio system is completely impacted by these same issues and I would have preferred she address that, as asyncio is part of the standard library now and is way more popular than gevent.
Right, the blog post gave me the impression she was calling out the combination of Python/Gunicorn/Gevent specifically for some reason. But if the underlying goal was to just point out that Python is slow then I am curious what people think the right solution is? Just switch out of Python and use Go or something else?
- zzzeek 7y agoThe underlying goal was to show that python gets CPU bound very easily, this is not at all the same as saying "python is slow". If I want slow I'd use Ruby.
- p_l 7y agoHaving used both, my experience is that I can make Ruby fast, while making Python fast starts with "let's stop using python in this code path" ...
- guggle 7y agoI love to work in python and I came here just to point out that it's pretty obvious one should not use it if raw performance is a concern (which is not in many situations). I remembered this Cal Henderson talk at Djangocon: https://i.postimg.cc/Dy81R2QQ/yourmom.png https://i.postimg.cc/Dy81R2QQ/yourmom.png That said, I wrote a bit of Go recently and the experience was pleasant enough that I'd consider it for future works (should the needed libraries exist), as the extra performance and ease of deployment comes with very little effort from the developer.