Implementing file reading in C/Python
John Machin
sjmachin at lexicon.net
Fri Jan 9 20:49:05 EST 2009
On Jan 9, 9:56 pm, mk <mrk... at gmail.com> 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?
And if C++ is using linked lists and Python isn't, it's not really the
same algorithm, is it?
Cheers,
John
More information about the Python-list
mailing list