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

Janos pypy-dev-issue at codespeak.net
Tue Mar 1 11:21:45 CET 2011


Janos <mjanos5 at gmail.com> added the comment:

It seems to me that not the csv module causes the performance difference. I
created a different version of the test.

There are 2 files in the attached tar.gz:

1. csvparsingtest_create_test_file.py: run it once, this creates the test data file.

2. csvparsingtest_read.py: this is the real test of the issue. This time, it
doesn't use the csv module. Reads the lines from the test file, split them at
commas, then convert the fields to floats. It still about 5x slower with pypy
than with cpython.

user at localhost:~/temp/pypytest$ time python csvparsingtest_read.py 

real	0m0.450s
user	0m0.416s
sys	0m0.036s

user at localhost:~/temp/pypytest$ time ~/usr/pypy-1.4.1-linux/bin/pypy
csvparsingtest_read.py 

real	0m2.410s
user	0m2.288s
sys	0m0.060s

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue641>
_______________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: csvparsingtest.tar.gz
Type: application/gzip
Size: 434 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-issue/attachments/20110301/1f29fcb6/attachment.bin>


More information about the Pypy-issue mailing list