News for hackers. Stuff that matters.
Re:Python 3.11.0 final is now available by cdavid on Tuesday October 25, 2022 @09:10AM (#33329982)
I doubt so, it would break almost any non trivial piece of python. And the ecosystem is a large reason for current python's success.

Being dynamic make it harder to be fast, but JS/v8 is as dynamic as python, and much faster.

Re:Python 3.11.0 final is now available by jokoon on Tuesday October 25, 2022 @10:41AM (#33331081)
If there was enough money, it would be possible to have a v8 equivalent to python.
Re:Python 3.11.0 final is now available by beagle3 on Tuesday October 25, 2022 @10:43AM (#33331125)
But some dynamic features, e.g. “with” make JS and its JITs give up and run slowly.

Those features are not in common use. Python’s hard-to-optimize dynamic features are more commonly used.

Re:Python 3.11.0 final is now available by mytherin on Tuesday October 25, 2022 @01:30PM (#33333623)
The hardest part about optimizing Python is the fact that there are so many packages out there relying on every single documented and undocumented aspect of the C/C++ interface, which is incredibly broad and directly tied to the internals of the language. If they change anything in a non-backwards compatible manner many of those packages will break, and those packages are the reason so many people use Python to begin with.

Javascript never had this problem, as all code was always written in Javascript itself by necessity, so it was far easier to optimize as you did not have to worry about backwards compatibility of the internals.

Re:Python 3.11.0 final is now available by cdavid on Wednesday October 26, 2022 @10:34AM (#33344334)
That's a excellent point. That ecosystem is also one of the main reason packaging in python is a bit of a clusterf*ck.

For C/C++ extensions, I think there may be hope to support a slow/emulating C API and a faster, less internals-leaking new API that extensions could adopt. It would take years for the migration, but if speed gains was say 5x, I think it could be realistic.

pypy managed to emulate the C API fairly well, after all. E.g. you can build numpy and pandas on top of pypy and it actually kinda works.