Implementing file reading in C/Python

mk mrkafk at gmail.com
Fri Jan 23 10:12:00 EST 2009


John Machin wrote:
>> The factor of 30 indeed does not seem right -- I have done somewhat
>> similar stuff (calculating Levenshtein distance [edit distance] on words
>> read from very large files), coded the same algorithm in pure Python and
>> C++ (using linked lists in C++) and Python version was 2.5 times slower.

> Levenshtein distance using linked lists? That's novel. Care to
> divulge?

I meant: using linked lists to store words that are compared. I found 
using vectors was slow.

Regards,
mk





More information about the Python-list mailing list