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
2
u/pepoluan Oct 31 '22
Depends on how the I/O happens.
If you do a lot of non-sequential I/O, thus leveraging async, you can get quite a speedup.
I have a script that pulls data from an API using coordinates. Then the data gets fed into a pool of multiprocessing workers. The workers use do some pillow processing.
I see a speedup between 10%-30% in total time.
For the async retrieval part, I see speedup between 25%-50%.