5 ms·
More than 300 comments here and still no convincing answer. Why the community wastes time on trying to make CPython faster when there is pypy which is already m
by wbolt 11mo ago
More than 300 comments here and still no convincing answer. Why the community wastes time on trying to make CPython faster when there is pypy which is already much faster? I understand pypy lacks libraries and feature parity with up to date CPython. But… can’t everyone refocus the efforts and just move to pypy to add all the missing bits and then just continue with pypy as the “official python”? Are there any serious technical reasons not to do it?
- otabdeveloper4 11mo ago> pypy which is already much faster It isn't.
- wbolt 11mo agoYes it is.
- bjoli 11mo agoFor all my applications, going to PyPy was an instant 2x improvement. Not only that, it is a lot easier to hack on. I might be biased, but the whole implementstion idea of PyPy seems a lot more sane.
- MobiusHorizons 11mo agoI think for pure python performance it is significantly faster at least on all the benchmarks I have seen. That said a lot of what people actually do in python calls into libraries that are written in C++ or C, which I believe has a similar performance (when it works) on pypy.
- physicsguy 11mo ago> when it works This is the problem!
- selcuka 11mo ago> can’t everyone refocus the efforts You have answered your own question. Seriously, though. PyPy is 2-3 versions behind CPython (3.11 vs 3.14) and it's not even 100% compatible with 3.11. Libraries such as psycopg and lxml are not fully supported. It's a hard sell.
- wbolt 11mo agoBut this is exactly my point. The resources pypy has are much smaller. And still for years they managed to follow up being just 2-3 versions behind with features and high on performance. So why not move all the resources from CPython to close the gap with features faster and replace CPython entirely? Since this is not happening I expect there to be serious reasons, but I fail to see them. This is what I ask for.
- famouswaffles 11mo agoPypy only has a handful of devs. If it had the PSF's official blessing, it wouldn't lag behind CPython so much.
- ActorNightly 11mo ago> Are there any serious technical reasons not to do it? Yes. First is startup time. REPL cycle being fast is a big advantage for development. From a business perspective, dev time is more expensive then compute time by orders of magnitude. Every time you make a change, you have to recompile the program. Meanwhile with regular python, you can literally develop during execution. Second is compatibility. Numpy and pytorch are ever evolving, and those are written a C extensions. Third is LLMs. If you really want speed, Gemma27bqat that runs on a single 3090 can translate python codebase into C/C++ pretty easily. No need to have any additional execution layer. My friend at Amazon pretty much writes Java code this way - prototypes a bunch of stuff in Python, and then has an LLM write the java code thats compatible with existing intra-amazon java templates.
- procaryote 11mo agoI really hope I'll never need to touch code written by people who code in python and throws it at a plausible randomiser to get java or C If you for some reason do this, please keep the python around so I can at least look at whatever the human was aiming at. It's probably also wrong as they picked this workflow, but there's a chance it has something useful
- mystifyingpoi 11mo agoI get the "old man yells at cloud" vibes from your comment. Who cares how he got the result? I thought our job is to create working software. If this flow works for him and creates code that meets company standards, then more power to him. However, if the output quality is crap, then well, maybe his creativity should not be rewarded. I've seem hefty amount of Map<Object, Object> in Java, written primarily by JS developers.
- Lutger 11mo agoAs an old man myself, I am quite sure the other old man has a good reason to yell at this particular cloud. Software is tremendously complex. It is one thing to write it, it is another to amend the thousands and thousands of bugs that inevitably follow, and implement the even bigger amount of adjustments and improvements successful software requires. The latter is the bane of any kind of code generation, whether is RAD, no-code, low-code or LLM ported codebases. Any kind of code generation that proves incredibly productivity in the writing of software is kind of like saying you have a lot of money by maxing out your creditcard. Maybe you can pay it back, maybe you can't. The fact that there is no mention of future debt is exactly the kind of thing that old men get suspicious about. I'm not saying the old men are correct. I'm just pointing out the reason for the yelling.
- ModernMech 11mo ago> Are there any serious technical reasons not to do it? Forget technical reasons, how would you ever do it? It feels like the equivalent of cultural reprogramming "You must stop using your preferred interpreter and halt all your efforts contrary to the one true interpreter". Nah, not going to happen in a free and open source language. Who would have the authority and control to make such a directive? Yes, there may be technical reasons, but the reason it doesn't happen more than any other is that programming languages are languages spoken by people, and therefore they evolve organically at no one's direction. Even in languages like Python with a strong bent for cultural sameness and a BDFL type direction, they still couldn't control it. Often times, dialects happen for technical reasons, but it's hard to get rid of them on technical grounds.