You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b4d59af
Browse filesBrowse the repository at this point in the historyBrowse files
gh-161155: Speed up ASCII lower() and upper() for str, bytes and bytearray
_Py_bytes_lower() and _Py_bytes_upper() now convert strings of at least
one machine word (8 bytes on 64-bit platforms, 4 on 32-bit) a word at a
time with integer arithmetic. When the length is not a multiple of the
word size, the last word overlaps the one before it. Shorter strings
still take the existing table loop.
str.lower(), str.upper() and str.casefold() use these functions for
ASCII strings, as do lower(), upper() and capitalize() on bytes and
bytearray.
0 commit comments