-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Faster decode and find_max_char implementations. #120196
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
Comments
Thanks for the report, Ruben; this looks interesting. Would you like to propose a PR? |
I'd love to. I have the code ready. Except I can't benchmark it because the build time is so long due to the module freeze. See: https://discuss.python.org/t/building-python-takes-longer-than-an-hour-due-to-freezing-objects-and-still-counting/55144/1 |
I submitted the code in a PR. I hope I will be able to benchmark this at some point in the coming weeks, but given the slow building time this seems unlikely. |
The PR was closed due to the added code complexity not weighing up to the performance improvement. |
Feature or enhancement
Proposal:
I have spotted a few inefficiencies in the stringlib implementations that hinder the compilers ability to optimize the code. These could be fixed.
memcpy(*_p, *_s, SIZEOF_SIZE_T); Using
*restrict` the compiler should understand that a read does not need to be performed twice, and memcpy using a fixed size is always optimized out.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: