The future of Python immutability

sturlamolden sturlamolden at yahoo.no
Sat Sep 5 07:41:08 EDT 2009


On 5 Sep, 08:47, Steven D'Aprano <st... at REMOVE-THIS-
cybersource.com.au> 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