Fast list traversal

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sun Nov 2 03:24:37 EST 2008


dineshv:
> What is the fastest way to traverse these long_list's sequentially
> from the beginning to the end?  Maybe there is another data structure
> that can be used instead of a list.

Psyco can help a lot in that kind of code.


>The elements of long_list are immutable (ie. don't change).<

A tuple too may be fit then, but probably it doesn't improve the
situation.

Bye,
bearophile



More information about the Python-list mailing list