Recursively traverse linked list -- help!

Gustavo Niemeyer niemeyer at conectiva.com
Tue Feb 19 08:44:02 EST 2002


> Sure, granted that you keep track of the middle link of your list, so
> that you don't have to traverse up to that point. But even if keep track
> of it you'll have to be doing pretty large lists before the linked list
> will outperform the builtin list.

Agreed.

It's also nice to remember why we use python in the first place. If I
had to write a linked list to keep billions of records with a very specific
and performance dependent algorithm, I would probably write a python module
in C. And if the whole application is dependent on performance, I wouldn't
use any high level language to develop it.

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]




More information about the Python-list mailing list