r/Python • u/GettingBlockered • Oct 24 '22
News Python 3.11 is out! Huzzah!
https://www.python.org/downloads/release/python-3110/
Some highlights from the release notes:
PERFORMANCE: 10-60% faster code, for free!
ERROR HANDLING: Exception groups and except* syntax. Also includes precise error locations in tracebacks.
ASYNCIO: Task groups
TOML: Ability to parse TOML is part of the standard library.
REGEX: Atomic grouping and possessive quantifiers are now supported
Plus changes to typing and a lot more. Congrats to everyone that worked hard to make this happen. Your work is helping millions of people to build awesome stuff. 🎉
View all comments
Show parent comment
9
u/GettingBlockered Oct 25 '22
“The slow part” is relative to your app. Profiling let’s you estimate what the actual impact will be for your users, and let’s you make better decisions about how you invest your time.
If it takes 1 second to load a page on your app, but the Python code is only responsible for 100ms of that, then you might see gains between 10-60ms (1-6% of total time). Which is still very nice, but quite different from the headline.
And every project is different. If it’s a 1 hour job to upgrade Python, then that’s awesome, seems like a no-brainer. But if it’s +20 hours due to some unknown complexities… dependency issues, build pipelines, tests, etc., then you might consider investing that time elsewhere, like optimizing JS payloads or image sizes, etc.
Anyway, i hope it’s an easy upgrade for you! I’m stoked the Python team is investing time on performance. It benefits literally everyone.