Skip to content

gh-126024: unicodeobject: optimize find_first_nonascii #127790

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 1 commit into from
Dec 13, 2024

Conversation

methane
Copy link
Member

@methane methane commented Dec 10, 2024

remove 1 branch.

@methane
Copy link
Member Author

methane commented Dec 10, 2024

bench: https://github.com/methane/notes/blob/02fdadf71aed28dd7b8a512b0ff2079f22033e55/c/first_nonascii/nonascii.c#L152-L221

On clang, this doesn't affect performance.
On gcc, this is little faster.

1. 0.011594819 ns
2. 0.009554766 ns

@methane methane added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 10, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @methane for commit c09f8a8 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 10, 2024
@methane methane requested a review from encukou December 10, 2024 12:36
// The search is done in `size_t` chunks.
// The start and end might not be aligned at `size_t` boundaries,
// so they're handled specially.

Copy link
Member Author

Choose a reason for hiding this comment

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

@encukou I copied your comments.

@encukou encukou changed the title unicodeobject: optimize find_first_nonascii gh-126024: unicodeobject: optimize find_first_nonascii Dec 13, 2024
@encukou encukou merged commit 5dd775b into python:main Dec 13, 2024
122 of 126 checks passed
@encukou
Copy link
Member

encukou commented Dec 13, 2024

Thank you!

@methane methane deleted the unicode-findfirstnonascii branch December 14, 2024 00:25
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants