Skip to content

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

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

Merged
merged 6 commits into from
Oct 22, 2022

Conversation

CAM-Gerlach
Copy link
Member

@CAM-Gerlach CAM-Gerlach commented Oct 19, 2022

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 bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Oct 19, 2022
@CAM-Gerlach 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 CAM-Gerlach mentioned this pull request Oct 19, 2022
33 tasks
@CAM-Gerlach CAM-Gerlach added 3.11 only security fixes needs backport to 3.11 only security fixes labels Oct 19, 2022

* 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``.
Copy link
Member

@markshannon markshannon Oct 21, 2022

Choose a reason for hiding this comment

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

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

Copy link
Member Author

@CAM-Gerlach CAM-Gerlach Oct 21, 2022

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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 pablogsal merged commit f58631b into python:main Oct 22, 2022
@miss-islington
Copy link
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
@bedevere-bot
Copy link

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

@bedevere-bot 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 <[email protected]>

Co-authored-by: C.A.M. Gerlach <[email protected]>
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 <[email protected]>

Co-authored-by: C.A.M. Gerlach <[email protected]>
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