aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorCody Maloney <cmaloney@users.noreply.github.com>2025-02-07 03:06:11 -0800
committerGitHub <noreply@github.com>2025-02-07 12:06:11 +0100
commita3d5aab9a89e311cded9c724ce7d5a873e4d680d (patch)
treea9414f49045a51f457a3ea93e4841d4a65e8212f /Python/generated_cases.c.h
parentae132edc296d27c6ed04fe4d400c67e3cfb622e8 (diff)
downloadcpython-a3d5aab9a89e311cded9c724ce7d5a873e4d680d.tar.gz
cpython-a3d5aab9a89e311cded9c724ce7d5a873e4d680d.zip
gh-129005: Align FileIO.readall between _pyio and _io (#129705)
Utilize `bytearray.resize()` and `os.readinto()` to reduce copies and match behavior of `_io.FileIO.readall()`. There is still an extra copy which means twice the memory required compared to FileIO because there isn't a zero-copy path from `bytearray` -> `bytes` currently. On my system reading a 2 GB file: `./python -m test -M8g -uall test_largefile -m test.test_largefile.PyLargeFileTest.test_large_read -v` Goes from ~2.7 seconds -> ~2.2 seconds Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Python/generated_cases.c.h')
0 files changed, 0 insertions, 0 deletions