]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-129005: _pyio.BufferedIO remove copy on readall (#129454)
authorCody Maloney <cmaloney@users.noreply.github.com>
Thu, 30 Jan 2025 11:23:25 +0000 (03:23 -0800)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2025 11:23:25 +0000 (11:23 +0000)
commite1c4ba928852eac0b0e0bded1c314e3e36975286
tree148adc5b5601356f07f854ca89fe35309addd47c
parent3bebe46d3413195ee18c5c9ada83a35d4fd1d0e7
gh-129005: _pyio.BufferedIO remove copy on readall (#129454)

Slicing buf and appending chunk would always result in a copy. Commonly
in a readall() there is no already read data in buf, and the amount of
data read may be large, so the copy is expensive.
Lib/_pyio.py
Misc/NEWS.d/next/Library/2025-01-29-00-00-01.gh-issue-129005.aV_3O8.rst [new file with mode: 0644]