need fast parser for comma/space delimited numbers

Darrell darrell at dorb.com
Sat Mar 18 12:44:17 EST 2000


les schaffer wrote:
> anyone care to take a guesstimate on how much further time i could
> save by coding something in C?

One other point, don't read the files one line at a time.
That's slow in Python.

My experience with extension modules says that you might expect 6x
improvement. The number can very wildly depending how optimal your Python
solution was in the first place.

Here's some code I did for fun and never used.
http://www.dorb.com/darrell/csv/testCsv.py
There's a thread on deja that describes how other people optimized this
problem in Python. I did it in 'C' just to see how much faster it would be.

I'd give you the deja link but they seem to be suffering a denial of service
attack or something.

--Darrell






More information about the Python-list mailing list