Staging
v0.8.1
https://github.com/python/cpython
Revision 4f1903061877776973c1bbfadd3d3f146920856e authored by Inada Naoki on 02 March 2019, 04:31:01 UTC, committed by GitHub on 02 March 2019, 04:31:01 UTC
It is changed from 16KiB to 64KiB.  The previous default value
is used since 1990.

coreutils chose 128 KiB as minimum buffer size for block device I/O.

But shutil.copyfileobj() can be used for non block devices.
So I choose more conservative value.

As my quick benchmark, performance difference between 64KiB and
128 KiB is up to ~5%.  On the other hand, performance difference
between 32 KiB and 64 KiB can be more than 10% when file is fully
buffered.

This is why 64 KiB is rational value.
1 parent bcfa450
History
Tip revision: 4f1903061877776973c1bbfadd3d3f146920856e authored by Inada Naoki on 02 March 2019, 04:31:01 UTC
bpo-36103: change default buffer size of shutil.copyfileobj() (GH-12115)
Tip revision: 4f19030
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.8 KB
.gitignore -rw-r--r-- 1.5 KB
.travis.yml -rw-r--r-- 7.9 KB
CODE_OF_CONDUCT.md -rw-r--r-- 609 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 63.9 KB
README.rst -rw-r--r-- 9.8 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 489.9 KB
configure.ac -rw-r--r-- 160.5 KB
install-sh -rwxr-xr-x 15.0 KB
pyconfig.h.in -rw-r--r-- 43.2 KB
setup.py -rw-r--r-- 99.2 KB

README.rst

back to top