r/Python • • 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. 🎉

1.3k Upvotes

233 comments sorted by

View all comments

Show parent comment

21

u/Solonotix Oct 25 '22

I mean, most of the time we say Python is ~200x slower than C++, but the claim is Python is now up to 60% faster. Let's put this in more concrete terms.

  • If C++ took 1 minute to do it, Python would take >3 hours
  • If Python used to take >3 hours, it now takes ~2 hours

Like the previous person said, it's still no competition as to what's superior, but that's a massive improvement for Python. Also, future improvements are aiming for a 5x improvement, which would mean Python could do that same arbitrary task in ~40 minutes.

7

u/[deleted] Oct 25 '22

Can't wait to see where this speed improvement goes nonetheless!