3 ms·
Experimentally JIT WHILE there is totally stable , 4-100x faster, almost 100% compatible PyPy exist and all they need is adopt it but didn't due to some politic
by v3ss0n 2y ago
Experimentally JIT WHILE there is totally stable , 4-100x faster, almost 100% compatible PyPy exist and all they need is adopt it but didn't due to some politics.
Yeah right..
- ksec 2y agoI don't follow Python closely. So why PyPy isn't adopted?
- dagw 2y agoThe biggest reasons is that it isn't compatible with the python C API. So any library that uses the C API would have to be rewritten.
- tekknolagi 2y agoThey have gotten much better about that recently and it's much much more compatible now.
- v3ss0n 2y agoThe main reason GVR said is "May be this is future of Python , but not now" . At that time pypy was already stable at 2.7.x version but python 2-3 split happen. PyPy team have to rewrite everything for Python3 and took them a while to catchup. I had managed to talk with one ex pypy developer that the main reason GVR and Python community do not promote much about PyPy is due to NIH - Not invented here - Since PyPy is developed by seperate but full time computer scientist and researchers, PHDs , not by the Guido community . https://pypy.org/people.html https://pypy.org/people.html One problem about popularity of pypy is they don't do any advertisement , promotion which I had critically voiced about it in their community - they moved to Github finally. Only other problem is CPython Ext , which is compatible but a little bit slower than CPython - that only pain point we have - which could be solved if there are more contributors and users using pypy. Actually Python , written in Python should be the main
- jononor 2y agoThankfully everyone is free to use PyPy, if they consider it the better solution!
- v3ss0n 2y agoSplitting efforts aren't good . PyPy is decade effort of making JIT Python and they had big success. But it doesn't get the praise by the python community - and they are only doing NIH solutions again and again. (First attemped by Google and they failed - unladen python , now this experiment results dosen't sound good). Why ignore millions of dollars spent in a decade effort of fulltime PHD researchers' work and doing their own thing? Yeah NIH is helluva drug.
- kaba0 2y agoAs others have mentioned - Python exposes very low-level details to C, making plenty of optimizations invalid as programs may make use of it.
- qeternity 2y agoPython allows a lot of paradigms that are really difficult to JIT. I have personally seen many instances where PyPy is actually slower than CPython for a basic web app because of this.
- v3ss0n 2y agoIt is only slow when you using C-Extension. Basic webapp don't use C-Extensions. If you are going to claim such please provide evidence. We have a chat server in production written in PyPy and Tornadoweb which had sped up 20x from CPython version and test benchmarks against GoLang based Websocket with Channels and Nodejs - The pypy implementation is 30% faster than node and 10-20% faster than Golang . Big plus is PyPy version drops memory usage by 80% . CPython version have around 200MB Ram usage and pypy version only about 40MB. On Heavy load (10k concurrent test) PyPy and Golang version are stable but Node version stop responding sometimes and packet losses occurs.
- Leynos 2y agoYou do know that the Tornado implementation of WebSocket uses a c extension? And if you use FastAPI then you're using Rust for serialisation and validation.
- v3ss0n 2y agoWell implemented c extensions are and cffi ones are fine for PyPy. Those that have problems are ones that depends on private c-api calls Tornado had moved to python asyncio for ages.
- qeternity 2y agoCongratulations. You sound like you have a very simple application. It is not only slow with C extensions. You would know this if you had more experience with PyPy on a real codebase.
- v3ss0n 2y agoThen define your real codebase. There is no point continuing this with just baseless talks. There are many projects, livbs in pure python without Any c extensions. PyPy work faster with cffi based libs than python c-extension Based ones too.