The future of Python immutability

sturlamolden sturlamolden at
Sat Sep 5 13:41:08 CEST 2009

On 5 Sep, 08:47, Steven D'Aprano <st... at REMOVE-THIS-> wrote:

> How do you know?

After more than 10 years experience with scientific programming I just
do. When it comes to numerics I have a gut feeling for what is fast
and what is slow.

It's not difficult actually. You just have to imagine how often the
interpreter is invoked. Explicit loops are therefore evilness in
numerical scripts. Vectorized array expressions tend to be comparable
to C in performance, because they do a lot of work independent of the
interpreter. What do we see here? Vectorized array expressions
throughout the code, no significant amount of looping by the
interpreter (just the recursion at the end).

More information about the Python-list mailing list