New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-47189: What's New in 3.11: Faster CPython #32235
base: main
Are you sure you want to change the base?
bpo-47189: What's New in 3.11: Faster CPython #32235
Conversation
Co-Authored-By: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
CC @gvanrossum @markshannon @brandtbucher @iritkatriel @sweeneyde @corona10 @kumaraditya303 @JelleZijlstra. For your opinions and review please (especially on the parts y'all contributed). |
You deserve it. |
Thanks for doing this. It is much appreciated.
I've left a few comments.
Doc/whatsnew/3.11.rst
Outdated
| @@ -62,6 +62,7 @@ Summary -- Release highlights | |||
| .. This section singles out the most important changes in Python 3.11. | |||
| Brevity is key. | |||
| - Python 3.11 is 22% faster than Python 3.10. See `Faster CPython`_ for details. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather claim a range, say 10% to 60%.
Once the latest PRs are merged it will be about 25%, if you must have a single number.
https://gist.github.com/markshannon/bf1b99177290db30dd0ab8f56446d0ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update this number when the benchmark link updates its values/ when those PRs are merged into main.
Co-Authored-By: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Doc/whatsnew/3.11.rst
Outdated
| CPython 3.11 is on average `1.22x faster <https://github.com/faster-cpython/ideas/blob/main/main-vs-310.rst>`_ | ||
| than CPython 3.10 when measured with the | ||
| `pyperformance <https://github.com/python/pyperformance>`_ benchmark suite, on | ||
| Ubuntu Linux. Depending on your workload, the speedup could be 10-60% faster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention compiler too? faster-cpython/ideas#331
| +---------------+--------------------+-------------------------------------------------------+-------------------+-------------------+ | ||
| | Unpack | ``*seq`` | Specialized for common containers such as ``list`` | 8% | Brandt Bucher | | ||
| | Sequence | | and ``tuple``. Avoids internal calling convention. | | | | ||
| +---------------+--------------------+-------------------------------------------------------+-------------------+-------------------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also COMPARE_OP, if we want to include that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. I left those out since they're less exciting/common operations.
Co-Authored-By: Alex Waygood <Alex.Waygood@Gmail.com>
|
@pablogsal are you OK with this going into 3.11 whats new? Or would you prefer I host this somewhere else and link to it in the whatsnew? |
For the time leave it here in its own section as in this way I will be able to easily do the final edits. Removing or moving information is much easier to add it as that way I don't need to consider what may be missing :) |
The static objects section's credits go to Kumar Aditya.
TODO:
__dict__optimizations[ ]dictmemory saving optimizations by Inada-san, but I have no clue where to start for thosehttps://bugs.python.org/issue47189