Document latest optimizations using _PyBytesWriter

This commit is contained in:
Victor Stinner 2015-10-14 10:10:00 +02:00
parent 772b2b09f2
commit ebcf9edc05
2 changed files with 17 additions and 4 deletions

View file

@ -141,16 +141,25 @@ Optimizations
============= =============
* The ASCII decoder is now up to 60 times as fast for error handlers: * The ASCII decoder is now up to 60 times as fast for error handlers:
``surrogateescape``, ``ignore`` and ``replace``. ``surrogateescape``, ``ignore`` and ``replace`` (Contributed
by Victor Stinner in :issue:`24870`).
* The ASCII and the Latin1 encoders are now up to 3 times as fast for the error * The ASCII and the Latin1 encoders are now up to 3 times as fast for the error
error ``surrogateescape``. error ``surrogateescape`` (Contributed by Victor Stinner in :issue:`25227`).
* The UTF-8 encoder is now up to 75 times as fast for error handlers: * The UTF-8 encoder is now up to 75 times as fast for error handlers:
``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass``. ``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass`` (Contributed
by Victor Stinner in :issue:`25267`).
* The UTF-8 decoder is now up to 15 times as fast for error handlers: * The UTF-8 decoder is now up to 15 times as fast for error handlers:
``ignore``, ``replace`` and ``surrogateescape``. ``ignore``, ``replace`` and ``surrogateescape`` (Contributed
by Victor Stinner in :issue:`25301`).
* ``bytes % args`` is now up to 2 times faster. (Contributed by Victor Stinner
in :issue:`25349`).
* ``bytearray % args`` is now between 2.5 and 5 times faster. (Contributed by
Victor Stinner in :issue:`25399`).
Build and C API Changes Build and C API Changes

View file

@ -10,6 +10,9 @@ Release date: XXXX-XX-XX
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #25399: Optimize bytearray % args using the new private _PyBytesWriter
API. Formatting is now between 2.5 and 5 times faster.
- Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new - Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
recursion limit is too low depending at the current recursion depth. Modify recursion limit is too low depending at the current recursion depth. Modify
also the "lower-water mark" formula to make it monotonic. This mark is used also the "lower-water mark" formula to make it monotonic. This mark is used
@ -19,6 +22,7 @@ Core and Builtins
sys.stdout.fileno() fails. sys.stdout.fileno() fails.
- Issue #25349: Optimize bytes % args using the new private _PyBytesWriter API. - Issue #25349: Optimize bytes % args using the new private _PyBytesWriter API.
Formatting is now up to 2 times faster.
- Issue #24806: Prevent builtin types that are not allowed to be subclassed from - Issue #24806: Prevent builtin types that are not allowed to be subclassed from
being subclassed through multiple inheritance. being subclassed through multiple inheritance.