[Python-Dev] file.readinto performance regression in Python 3.2 vs. 2.7?

Antoine Pitrou solipsis at pitrou.net
Fri Nov 25 11:55:04 CET 2011


On Fri, 25 Nov 2011 08:38:48 +0200
Eli Bendersky <eliben at gmail.com> wrote:
> 
> Just to be clear, there were two separate issues raised here. One is the
> speed regression of readinto() from 2.7 to 3.2, and the other is the
> relative slowness of justread() in 3.3
> 
> Regarding the second, I'm not sure it's an issue because I tried a larger
> file (100MB and then also 300MB) and the speed of 3.3 is now on par with
> 3.2 and 2.7
> 
> However, the original question remains - on the 100MB file also, although
> in 2.7 readinto is 35% faster than readandcopy(), on 3.2 it's about the
> same speed (even a few % slower). That said, I now observe with Python 3.3
> the same speed as with 2.7, including the readinto() speedup - so it
> appears that the readinto() regression has been solved in 3.3? Any clue
> about where it happened (i.e. which bug/changeset)?

It would probably be http://hg.python.org/cpython/rev/a1d77c6f4ec1/

Regards

Antoine.




More information about the Python-Dev mailing list