News for hackers. Stuff that matters.
Re:Python 3.11 by faizshah on Sunday October 03, 2021 @09:46PM (#28742166)
This is just a change log its better to link to the 3.11 what’s new: https://docs.python.org/3.11/whatsnew/3.11.html
Re:Python 3.11 by btown on Sunday October 03, 2021 @10:44PM (#28742462)
Between this link and the OP, we're seeing the first improvements to drop from Mark Shannon's Microsoft-funded full-time work on CPython optimization, alongside Eric Snow and Guido van Rossum:

https://www.theregister.com/2021/05/19/faster_python_mark_sh...

https://github.com/markshannon/faster-cpython/blob/master/pl... - indicates that this is step 2 of 4, where the forthcoming steps actually plan to introduce JIT compilation!

From the OP Changelog:

- bpo-44590: All necessary data for executing a Python function (local variables, stack, etc) is now kept in a per-thread stack. Frame objects are lazily allocated on demand. This increases performance by about 7% on the standard benchmark suite. Introspection and debugging are unaffected as frame objects are always available when needed. Patch by Mark Shannon.

And from the What's New:

- “Zero-cost” exceptions are implemented. The cost of try statements is almost eliminated when no exception is raised. (Contributed by Mark Shannon in bpo-40222.)

- Method calls with keywords are now faster due to bytecode changes which avoid creating bound method instances. Previously, this optimization was applied only to method calls with purely positional arguments. (Contributed by Ken Jin and Mark Shannon in bpo-26110, based on ideas implemented in PyPy.)

Really, really exciting beginnings. I can't wait to see what's next!

Re:Python 3.11 by vland on Monday October 04, 2021 @06:22AM (#28745004)
7% is nothing, and the benchmark suite is notoriously unreliable. As usual, whenever a company that has done nothing at all for Python in 30 years attaches its name to the product of others, people fall over themselves to praise it.

Real improvements made by individuals for the last decade are taken for granted and aren't mentioned. The corporations are credit thieves.

Re:Python 3.11 by porker on Monday October 04, 2021 @03:06AM (#28743946)
> Between this link and the OP, we're seeing the first improvements to drop from Mark Shannon's Microsoft-funded full-time work on CPython optimization, alongside Eric Snow and Guido van Rossum

Oh good, after the proposals to speed up Python I didn't hear of any organisation stepping up to sponsor them. It's great to find that Microsoft did.

Re:Python 3.11 by zerocrates on Sunday October 03, 2021 @11:24PM (#28742678)
With Python style favoring exceptions, I could see just the zero-cost try alone being a meaningful improvement.
Re:Python 3.11 by BiteCode_dev on Monday October 04, 2021 @03:45AM (#28744159)
On fact, for loops are try/except under the hood.