[Tutor] fast list traversal

Dinesh B Vadhia dineshbvadhia at hotmail.com
Thu Oct 30 20:00:05 CET 2008

Bob:  Nothing special is being done on the elements of the list - additions/subtractions/ - and storing the results in an array. That's it.


From: bob gailer 
Sent: Thursday, October 30, 2008 11:40 AM
To: Dinesh B Vadhia 
Cc: tutor at python.org 
Subject: Re: [Tutor] fast list traversal

Dinesh B Vadhia wrote:
> I need to process a large number (> 20,000) of long and variable 
> length lists (> 5,000 elements) ie.
> for element in long_list:
>     <do something with element>        # the result of this operation 
> is not a list
> The performance is reasonable but I wonder if there are faster Python 
> methods?

I don't know of any. Of course it could depend on what you are doing 
with each element. Say more!

Bob Gailer
Chapel Hill NC 

When we take the time to be aware of our feelings and 
needs we have more satisfying interatctions with others.

Nonviolent Communication provides tools for this awareness.

As a coach and trainer I can assist you in learning this process.

What is YOUR biggest relationship challenge?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20081030/eb5a0cea/attachment.htm>

More information about the Tutor mailing list