You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <[email protected]>
0 commit comments