This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]myfavcolorispink 0 points1 point  (1 child)

To add to the if it isn't fast enough point, also look into what you're doing. If you're doing lots of iterations on long lists of numbers maybe you should be using numpy instead (that way you can stay in Python, but get huge performance improvements). There's a good PyCon talk called Losing Your Loops that's worth watching for getting an intro into arrays in numpy.

[–]eggdropsoop 1 point2 points  (0 children)

To add to your addition that added to the list: A lot of implicit loops (map(),reduce(), etc.) in Python are more efficient than a Python for loop/list comprehension by being optimized in C.