[issue12175] FileIO.readall() read the file position and size at each read
STINNER Victor
report at bugs.python.org
Wed May 25 17:05:55 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Number of syscalls without the patch -> with the patch:
- read the README file, text mode: 17 -> 12 syscalls (-5)
- read the README file, binary mode: 15 -> 11 syscalls (-4)
- read a binary file of 10 MB: 17 -> 12 syscalls (-5)
Quick benchmark open('README').read(); open('README', 'rb').read() in a loop: 359.1 ms -> 335.4 ms (-7%). So it's not really faster.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12175>
_______________________________________
More information about the Python-bugs-list
mailing list