A further 5% speedup for UTF-8 decoding

Achieved by decoding in larger chunks thereby amortizing the cost
of creating various constant vectors over larger chunks.
This commit is contained in:
Kovid Goyal
2024-02-01 17:09:12 +05:30
parent 0bccada9d1
commit 6cdc7ac91d
4 changed files with 201 additions and 165 deletions

View File

@@ -101,7 +101,7 @@ test_utf8_decode_to_sentinel(PyObject *self UNUSED, PyObject *args) {
}
}
utf8_decoder_free(&d);
return Py_BuildValue("OO", found_sentinel ? Py_True : Py_False, ans);
return Py_BuildValue("OOi", found_sentinel ? Py_True : Py_False, ans, p);
}
// }}}