3 ms·
I really wish PSF would adopt PyPy as a separate project. It is so underrated. People still think it supports a subset of Python code and that it is slow with C
by nromiun 1y ago
I really wish PSF would adopt PyPy as a separate project. It is so underrated. People still think it supports a subset of Python code and that it is slow with C ffi code
But the latest PyPy supports all of Python 3.12 and it is just as fast with C ffi code as JIT Python code. It is literally magic and if it was more popular Python would not have a reputation for being slow.
- quibono 1y agoDo you happen to know if Flask is supported by any chance?
- nromiun 1y agoI just tested it and it works perfectly.
- tgbugs 1y agoYes, have been using Flask on PyPy3 for years. I get about a 4x speedup.
- Twirrim 1y agoYes. I've had a small webapp running under it quite happily (complete overkill, but it's a personal project and I was curious). Very basic hello world app hosted under gunicorn (just returning the string "hello world", so hopefully this is measuring the framework time). Siege set to do 10k requests, 25 concurrency, running that twice so that they each have a chance to "warm up", the second round (warmed up) results give me: pypy : 8127.44 trans/sec cpython: 4512.64 trans/sec So it seems like there's definitely things that pypy's JIT can do to speed up the Flask underpinnings.
- ziml77 1y agoPyPy is amazing and it's actually a bit baffling that it's not the default that everyone is using in production. I've had Python jobs go from taking hours to run, down to minutes simply by switching to PyPy.