2013/7/3 Eleytherios Stamatogiannakis <estama@gmail.com>
Hello,

We also found a case where PyPy is 2x slower than CPython. The following code:

This is because of I/O.
If I replace the file with a custom class which has an empty write() method,
pypy is twice faster than CPython.

Note: with pypy, io.open() is even slower :-(

 
<<<<

import cPickle

fileIter=open("pypytesting", "w+b")
mylist = ["qwerty"] * 100

for i in xrange(1000000):
        cPickle.dump(mylist, fileIter,1)

>>>>

Runs at:
        CPython 2.7.3:  13.114 sec
        PyPy nightly:    29.239 sec

[Warning: it'll produce a file (pypytesting) that is 205 MB in size]

Kind regards,

lefteris.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev



--
Amaury Forgeot d'Arc