[pypy-issue] [issue791] Simple wordcount is significantly slower and fatter than CPython
tracker at bugs.pypy.org
Sat Jul 16 07:41:12 CEST 2011
Justin Peel <peelpy at gmail.com> added the comment:
I don't know how much help this will be, but I decided to do a break down on
various operations. These were done with a file containing only a million
generated strings rather than ten million because I didn't want to wait forever.
I did each test several times to make sure that the timings were consistent and
took the median value. Timings were all done on a 32-bit Linux system with the
pypy nightly build from July 14th, 2011. CPython version was 2.7.1.
just Counter on stdin-
Counter w/ print key, value-
Counter w/ print key[:-1], value-
iterating line by line over stdin-
iterating line by line over stdin and printing each line-
This indicates to me that we need to work on speeding up printing, the Counter
object, and slicing strings (maybe this is a GC issue as well?). Iterating over
stdin can use some work too, but those other ones are more worrisome to me.
PyPy bug tracker <tracker at bugs.pypy.org>
More information about the pypy-issue