diff options
author | Ma Lin <animalize@users.noreply.github.com> | 2021-04-28 06:58:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-28 06:58:54 (GMT) |
commit | f9bedb630e8a0b7d94e1c7e609b20dfaa2b22231 (patch) | |
tree | ca8e232aebdae960f8a55737897cd20766df71ca /Doc | |
parent | a5e64444e6df7d1d498576bab26deaddc288a7bd (diff) | |
download | cpython-f9bedb630e8a0b7d94e1c7e609b20dfaa2b22231.zip cpython-f9bedb630e8a0b7d94e1c7e609b20dfaa2b22231.tar.gz cpython-f9bedb630e8a0b7d94e1c7e609b20dfaa2b22231.tar.bz2 |
bpo-41486: Faster bz2/lzma/zlib via new output buffering (GH-21740)
Faster bz2/lzma/zlib via new output buffering.
Also adds .readall() function to _compression.DecompressReader class
to take best advantage of this in the consume-all-output at once scenario.
Often a 5-20% speedup in common scenarios due to less data copying.
Contributed by Ma Lin.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/3.10.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index eeb0c29..2d8bb28 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -1243,6 +1243,12 @@ Optimizations for more details. (Contributed by Victor Stinner and Pablo Galindo in :issue:`38980`.) +* Use a new output buffer management code for :mod:`bz2` / :mod:`lzma` / + :mod:`zlib` modules, and add ``.readall()`` function to + ``_compression.DecompressReader`` class. bz2 decompression 1.09x ~ 1.17x + faster, lzma decompression 1.20x ~ 1.32x faster, ``GzipFile.read(-1)`` 1.11x + ~ 1.18x faster. (Contributed by Ma Lin, reviewed by Gregory P. Smith, in :issue:`41486`) + * Function parameters and their annotations are no longer computed at runtime, but rather at compilation time. They are stored as a tuple of strings at the bytecode level. It is now around 2 times faster to create a function with |