News for hackers. Stuff that matters.
Re:Faster CPython 3.12 Plan by jokoon on Tuesday September 20, 2022 @07:48AM (#32910431)
I wonder if python could possibly be as fast as js if enough money was spent on it.
Re:Faster CPython 3.12 Plan by _joel on Tuesday September 20, 2022 @08:02AM (#32910537)
It's not a case of money imho, it's a case of it's a juggernaut of a userbase and ecosystem that moves very slowly and implementing improvements to execution times (generally) are intremental changes, not paradigm shifts as they make backwards compatability a nightmare/impossible.

I mean 2.x is still in the wild and some companies provide support for it, still!

Re:Faster CPython 3.12 Plan by mindwok on Tuesday September 20, 2022 @08:29AM (#32910764)
I think the other issue if we compare it to JS is the unfortunate reliance on C that python has. When Chrome came around, JavaScript was already standardised and there were many competing implementations which had to conform to ECMAScript and give users a relatively consistent experience. So when Google made V8 they could kind of go crazy with optimisations as long as they conformed to the spec.

Python on the other hand has one real implementation, and the ecosystem has become extremely intertwined with that implementation. Implementing a new Python interpreter is great, but it rarely gains traction because most of the ecosystem is so reliant on CPython specific modules that don’t work in the new interpreter so they never really get off the ground.

Re:Faster CPython 3.12 Plan by miohtama on Tuesday September 20, 2022 @11:06AM (#32912702)
This is possible, but it would need some backwards incompatible in the object model. We still are likely to see Python 4 on one day. People are still remembering the pain Python 3 transition caused.
Re:Faster CPython 3.12 Plan by IshKebab on Tuesday September 20, 2022 @08:19AM (#32910666)
Unlikely. Python has lots of features that were added without any thought to how to make them run fast - it simply wasn't a goal. As a result Python includes a ton of dynamic features that make it really hard to optimise.
Re:Faster CPython 3.12 Plan by ahrzb on Tuesday September 20, 2022 @10:32AM (#32912154)
I don’t think so, there are some design choices that make the two quite different. This „dictionaries all the way down“ approach has a cost.