-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-117431: Adapt str.find and friends to use the METH_FASTCALL calling convention #117468
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
erlend-aasland
merged 20 commits into
python:main
from
erlend-aasland:perf/str.find-and-friends
Apr 3, 2024
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c038634
Draft: adapt str.{start,end}swith to Argument Clinic
erlend-aasland a9d3172
Revert unneeded and malformed change
erlend-aasland 2ce5be6
Loosen error message tests
erlend-aasland 6c95a0d
NEWS
erlend-aasland 0ee5a28
Adapt str.count
erlend-aasland ec4c400
Adapt str.find
erlend-aasland 6f05fe6
fixup! Adapt str.find
erlend-aasland 4c46570
Adapt str.index
erlend-aasland df08da8
Adapt str.rfind
erlend-aasland 9f26ea8
Adapt str.rindex
erlend-aasland 1970887
Fixup docstrings
erlend-aasland 571976d
Adapt NEWS
erlend-aasland 154fe70
Address review: also mention str.count in the NEWS entry
erlend-aasland 8fe04ae
Fixup endswith signature
erlend-aasland 7b02515
Merge branch 'perf/starwith' into perf/str.find-and-friends
erlend-aasland c2ce49e
Address Jelle's review: clarify default values in param docstrings
erlend-aasland cae4c7e
Merge branch 'perf/starwith' into perf/str.find-and-friends
erlend-aasland d776fcd
Pull in main
erlend-aasland e7a55a8
any_find_slice() can return -2 on error
erlend-aasland ad10cb0
Pull in main
erlend-aasland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
12 changes: 10 additions & 2 deletions
12
Misc/NEWS.d/next/Core and Builtins/2024-04-02-17-37-35.gh-issue-117431.vDKAOn.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
Improve the performance of :meth:`str.startswith` and :meth:`str.endswith` | ||
by adapting them to the :c:macro:`METH_FASTCALL` calling convention. | ||
Improve the performance of the following :class:`str` methods | ||
by adapting them to the :c:macro:`METH_FASTCALL` calling convention: | ||
|
||
* :meth:`~str.count` | ||
* :meth:`~str.endswith` | ||
* :meth:`~str.find` | ||
* :meth:`~str.index` | ||
* :meth:`~str.rfind` | ||
* :meth:`~str.rindex` | ||
* :meth:`~str.startswith` | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.