[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

Stefan Behnel report at bugs.python.org
Mon Aug 17 10:29:19 EDT 2020


Stefan Behnel <stefan_ml at behnel.de> added the comment:

> libdeflate and isa-l use different compression ratio's for the levels.

I don't see why these would need to translate 1:1. The zlib module is a Python API wrapper, it can do its own mapping here, or use the libraries selectively only for some compression levels. Python code also cannot rely on an exact bit pattern coming out of the zlib/gzip compressor, since that might change with the zlib version that is available. So I think we're fine when replacing the underlying implementation, as long as the API does not change and the output is strictly zlib/gzip compatible (and there are no visible performance/size regressions, as your numbers seem to suggest, but that would need some broader testing).


You also wrote on python-ideas that

> It is packaged in linux distros already

That might be an option then. CPython could use the existing library if it is available. It doesn't have to ship the sources. Most Linux distributions already build some standard library modules against the system-wide installed libraries rather than whatever CPython ships in its sources. And those distributions could then make the library a fixed dependency of their CPython packages.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41566>
_______________________________________


More information about the Python-bugs-list mailing list