Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
erlend-aasland merged 20 commits intopython:mainfromerlend-aasland:perf/str.find-and-friendsApr 3, 2024
Merged
gh-117431: Adapt str.find and friends to use the METH_FASTCALL calling convention#117468
erlend-aasland merged 20 commits intopython:mainfromerlend-aasland:perf/str.find-and-friendsApr 3, 2024
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
Misc/NEWS.d/next/Core and Builtins/2024-04-02-17-37-35.gh-issue-117431.vDKAOn.rstShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ContributorAuthor
erlend-aasland commentedApr 3, 2024
Similar speedsups as with #main$./python.exe -m timeit -s"s = 'abcdef'""s.count('a')"5000000 loops, best of 5: 92.5 nsec per loop#This PR$./python.exe -m timeit -s"s = 'abcdef'""s.count('a')"10000000 loops, best of 5: 26.2 nsec per loop |
methane approved these changesApr 3, 2024
ContributorAuthor
erlend-aasland commentedApr 3, 2024
Thanks for the review, Inada-san. |
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull requestApr 6, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
…n#117468)This change gives a significant speedup, as the METH_FASTCALL callingconvention is now used. The following methods are adapted:- str.count- str.find- str.index- str.rfind- str.rindex
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
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.