Kaydet (Commit) 94d558b0 authored tarafından Victor Stinner's avatar Victor Stinner

Optimize _PyUnicode_FindMaxChar() find pure ASCII strings

üst fea73efc
......@@ -1985,6 +1985,9 @@ _PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end)
if (start == end)
return 127;
if (PyUnicode_IS_ASCII(unicode))
return 127;
kind = PyUnicode_KIND(unicode);
startptr = PyUnicode_DATA(unicode);
endptr = (char *)startptr + end * kind;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment