Python advocacy in scientific computation

Robert Kern robert.kern at gmail.com
Sun Mar 5 14:16:39 EST 2006


sturlamolden wrote:
> Robert Kern wrote:

>>Yes, and this is why you will keep saying, "My simulation is running too
>>slowly," and "My simulation is running out of memory." All the vectorization you
>>do won't make a quadratic algorithm run in O(n log(n)) time. Knowing the right
>>algorithm and the right data structures to use will save you programming time
>>and execution time. Time is money, remember, and every hour you spend tweaking
>>Matlab code to get an extra 5% of speed is just so much grant money down the drain.
> 
> Yes, and that is why I use C (that is ISO C99, not ANSI C98) instead of
> Matlab for everything except trivial tasks. The design of Matlab's
> language is fundamentally flawed. I once wrote a tutorial on how to
> implement things like lists and trees in Matlab (using functional
> programming, e.g. using functions to represent list nodes), but it's
> just a toy. And as Matlab's run-time does reference counting insted of
> proper garbage collection, any datastructure more complex than arrays
> are sure to leak memory (I believe Python also suffered from this as
> some point).

Python still uses reference counting and has several very good data structures
more complex than arrays. And yet, most programs don't leak memory.

> Matlab is not useful for anything except plotting data
> quickly. And as for the expensive license, I am not sure its worth it.
> I have been considering a move to Scilab for some time, but it too
> carries the burden of working with a flawed language.

And you need to ask why Python is a better Matlab than Matlab?

-- 
Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Python-list mailing list