← 返回首页
gh-95913: Edit & expand Optimizations in 3.11 WhatsNew by CAM-Gerlach · Pull Request #98426 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-95913: Edit & expand Optimizations in 3.11 WhatsNew#98426

Merged
pablogsal merged 6 commits into
python:mainfrom
CAM-Gerlach:whatsnew-optimizations
Oct 22, 2022
Merged

gh-95913: Edit & expand Optimizations in 3.11 WhatsNew#98426
pablogsal merged 6 commits into
python:mainfrom
CAM-Gerlach:whatsnew-optimizations

Conversation

CAM-Gerlach commented Oct 19, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Part of #95913

I've added Sphinx markup and cross references to the Optimizations section of the Python What's New document, copyedited the text to fix grammar errors, read better and be slightly clearer, and sorted it by language, then builtins, then standard library (sorted by module name).

Additionally, I've added a handful of additional optimizations to common functions with documented substantial (>=15%) performance increases mentioned in the changelog (that were unrelated to Faster CPython), and consistent with the existing optimizations mentioned here and in previous verisons. These are:

bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Oct 19, 2022
CAM-Gerlach changed the title gh-95913: Expand, edit, sort & xref Optimizations in 3.11 WhatsNew gh-95913: Edit & expand Optimizations in 3.11 WhatsNew Oct 19, 2022
CAM-Gerlach mentioned this pull request Oct 19, 2022
33 tasks
CAM-Gerlach added 3.11 only security fixes needs backport to 3.11 only security fixes labels Oct 19, 2022
Comment thread Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Comment thread Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Comment thread Doc/whatsnew/3.11.rst

* Pure ASCII strings are now normalized in constant time by :func:`unicodedata.normalize`.
(Contributed by Dong-hee Na in :issue:`44987`.)
* :func:`sum` is now nearly 30% faster for integers smaller than ``2**30``.

markshannon Oct 21, 2022
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

sum() is still much slower than 2.7.
Maybe we shouldn't mention this, until it is fixed in 3.12

CAM-Gerlach Oct 21, 2022
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Sure, though on the other hand, it still a fairly substantial improvement over 3.10, the previous feature version, which seems to me is the main focus of this section—at least in the past, I'm not sure optimizations were only mentioned if they exceeded 2.7's speed for something, since that likely wasn't the case for quite a few of them. That said, I'm certainly not the expert here (unlike you all), and will of course defer to the judgement of @pablogsal as RM and you and rest of the core dev performance folks on whether this should be included, if you think its best left out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

On discuss - release, Pable said "I don’t think there is anything wrong mentioning that is faster than the version in 3.10. After all there was work here to make the situation better and if true, I don’t see why a considerable improvement over the previous version should not be mentioned". Sum is not new, but since we have an optimization section, I agree.

pablogsal merged commit f58631b into python:main Oct 22, 2022

Copy link
Copy Markdown
Contributor

Thanks @CAM-Gerlach for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 22, 2022
…H-98426) (cherry picked from commit f58631b) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

Copy link
Copy Markdown

GH-98554 is a backport of this pull request to the 3.11 branch.

bedevere-bot removed the needs backport to 3.11 only security fixes label Oct 22, 2022
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
…) (#98554) gh-95913: Edit & expand Optimizations in 3.11 WhatsNew (GH-98426) (cherry picked from commit f58631b) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
…) (#98554) gh-95913: Edit & expand Optimizations in 3.11 WhatsNew (GH-98426) (cherry picked from commit f58631b) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.11 only security fixes docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

Footer

© 2026 GitHub, Inc.