Can you do it faster? (parsing text file)

Marcus Stojek stojek at part-gmbh.de
Wed Jan 29 07:20:16 EST 2003


Hi,

a lot of thanks to all of you. I have tried all of the things
that you have suggested. "minor" optimization like changing scope
of the string functions or using map etc. didn't solve my problem.
Using csv is very comfortable, but increases speed only by app. 1 sec.

The real hitter is SimpleParse. For my testfile I am down to app. 3
sec. with the grammar from Mike (thanks).

Of course my "real world" parser has to be more sophisticated and I
still have to convert the data into floats, ints etc. and collect them
in lists. I guess the DispatchProcessor the right tool for this, but I
still have some problems to understand the concept.

Some work for me, but as Stephen said -- a lot of fun.

thanks again,
marcus






More information about the Python-list mailing list