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.
PyPy 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.
Do you happen to know if Flask is supported by any chance?
Yes. 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:
So it seems like there's definitely things that pypy's JIT can do to speed up the Flask underpinnings.Yes, have been using Flask on PyPy3 for years. I get about a 4x speedup.
I just tested it and it works perfectly.