SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 0 Python

Issue #25318: Add _PyBytesWriter API

Add a new private API to optimize Unicode encoders. It uses a small buffer
allocated on the stack and supports overallocation.

Use _PyBytesWriter API for UCS1 (ASCII and Latin1) and UTF-8 encoders. Enable
overallocation for the UTF-8 encoder with error handlers.

unicode_encode_ucs1(): initialize collend to collstart+1 to not check the
current character twice, we already know that it is not ASCII.
V
Victor Stinner committed
fdfbf781140f22619b0ef6bfeac792496774bb69
Parent: 08ec6d9