STINNER Victor <vstin...@python.org> added the comment:

It would be interested to see if using _PyBytesWriter in bz2, lzma, zlib and 
_io.FileIO.readall() would speed up the code. I would prefer to centralize the 
buffer allocation logic in _PyBytesWriter rather than having custom code in 
each file. _PyBytesWriter is designed to reduce the number of realloc() by 
using overallocation, it uses a different overallocation ratio on Windows, and 
it uses a small buffer allocated on the stack for strings up to 512 bytes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41486>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to