[PyPy-issue] [issue641] reading CSV files with csv module is much slower than CPython 2.6.6

Amaury Forgeot d Arc pypy-dev-issue at codespeak.net
Tue Mar 1 12:01:11 CET 2011


Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

Actually the results are much better, and depend on the versions of CPython and pypy.
With the simple script: 

def f():
    for a in range(10000):
        float("0.395963681409")

I run 'python -m timeit -s "from script import f" f()'
on Windows:
CPython2.5: 100 loops, best of 3: 15.2 msec per loop
CPython2.6: 100 loops, best of 3: 8.43 msec per loop
CPython2.7: 100 loops, best of 3: 3.28 msec per loop
CPython3.2: 100 loops, best of 3: 4.34 msec per loop
pypy-1.4.1: 10 loops, best of 3: 46.4 msec per loop   (your version)
pypy-nojit: 100 loops, best of 3: 6.26 msec per loop  (recent build)
pypy-jit  : 100 loops, best of 3: 1.89 msec per loop  (default branch, built 1 month ago)

The improvements are certainly due to the new dtoa functions (David Gay's floating point 
routines). Now csvparsingtest_read.py runs a bit faster than with python2.7.

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue641>
_______________________________________________________



More information about the Pypy-issue mailing list