Nikolaus Rath added the comment:
Attached is an updated patch that
- removes the code duplication in _pyio.BufferedIOBase
- adds an internal _readinto helper method to _pyio.BufferedReader that makes
the implementation similar to io.BufferedReader.
- implements _pyio.BuffereadReader.{readinto,readinto1} in terms of the new
helper method and, as a side effect, also increases their performance.
Performance of the _pyio implementation on my system is:
pre-patch:
readinto: 5.130e+00 seconds
readinto1 not available
post-patch:
readinto: 2.039e+00 seconds
readinto1: 1.995e+00 seconds
----------
Added file: http://bugs.python.org/file34863/issue20578_r3.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20578>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com