Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-117431: Adapt str.{start,end}swith to use the METH_FASTCALL calling convention#117466

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 6 commits intopython:mainfromerlend-aasland:perf/starwith
Apr 3, 2024

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedApr 2, 2024
edited by bedevere-appbot
Loading

@erlend-aasland
Copy link
ContributorAuthor

cc.faster-cpython/ideas#671

@erlend-aaslanderlend-aasland changed the titleDraft: adapt str.{start,end}swith to Argument Clinicgh-117431: Adapt str.{start,end}swith to use the METH_FASTCALL calling conventionApr 2, 2024
@erlend-aaslanderlend-aasland marked this pull request as ready for reviewApril 2, 2024 15:37
@erlend-aasland
Copy link
ContributorAuthor

# main$ ./python.exe -m timeit -s "s = 'abcdef'" "s.startswith('abc')"5000000 loops, best of 5: 89.1 nsec per loop# this PR$ ./python.exe -m timeit -s "s = 'abcdef'" "s.startswith('abc')"10000000 loops, best of 5: 26.4 nsec per loop
Fidget-Spinner reacted with thumbs up emojiFidget-Spinner, dolfinus, AlexWaygood, hugovk, and bluss reacted with rocket emoji

@erlend-aasland
Copy link
ContributorAuthor

erlend-aasland commentedApr 2, 2024
edited
Loading

We'll also want to convertstr.find and friend and finally get rid of the parsing helper in strlib. However, that is best left to a follow-up PR (#117468). I prefer small and incremental changes.

Eclips4 reacted with thumbs up emoji

@erlend-aasland
Copy link
ContributorAuthor

Thanks for the review,@JelleZijlstra and@eendebakpt. I'll hold off merging for a day or two.

JelleZijlstra reacted with thumbs up emoji

@erlend-aasland
Copy link
ContributorAuthor

erlend-aasland commentedApr 3, 2024
edited
Loading

Well, with two core devs approving, I'll go ahead and merge. Thanks for the reviews.

eendebakpt, hugovk, and ssweber reacted with hooray emoji

@erlend-aaslanderlend-aasland merged commit444156e intopython:mainApr 3, 2024
@erlend-aaslanderlend-aasland deleted the perf/starwith branchApril 3, 2024 07:11
@vstinner
Copy link
Member

Nice optimization!

erlend-aasland reacted with heart emoji

diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
…inic (python#117466)This change gives a significant speedup, as the METH_FASTCALL callingconvention is now used.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@methanemethanemethane approved these changes

@eendebakpteendebakpteendebakpt left review comments

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@erlend-aasland@vstinner@methane@eendebakpt@JelleZijlstra

[8]ページ先頭

©2009-2025 Movatter.jp