On 16 Aug, 11:45, "bartc" <ba...@freeuk.com> wrote:

> A for-loop, for iterating over a simple sequence, should be one of the
> fastest things in the language.

Anyone experienced with interpreted high-level languages knows this is
not true. Not because iterating a sequence is expensive, but because
the interpreter is constantly executing the body of the loop. There is
a reason why Matlab and Python/NumPy programmers rely heavily on
vectorized array expressions for efficient numerics.

The only thing more evil than a for-loop is recursive function calls.

This does not mean Python is slow. It just means you have to program
differently.







-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to