Python as a numerical prototyping language.

Oren Tirosh oren-py-l at hishome.net
Wed Dec 17 04:53:58 EST 2003


On Tue, Dec 16, 2003 at 09:16:33PM +0100, Carl wrote:
> I have been using Python for quite some time now and I love it. I use it
> mainly for explorative computing and numerical prototyping, ie testing and
> trying out different kinds of algorithms and computational schemes. The use
> of Python as my first-choice language has made me extremely productive. 
> 
> Now, I have always believed that Python is a poor performer in terms of
> numerical speed. My experience, however, is that the efficient use of
> dictionaries, lists, precompiled numerical libraries, etc makes Python a
> higly competitive language for scientific computing (in comparison with
> more traditional languages such as C, C++ and different versions of
> Fortran).
> 
> Where is Python heading? Will it be a viable replacement for traditional
> number-crunching languages in the near-term future?

It already is. When dealing with large vectors Numerical Python is your 
friend. The overhead of the interpreter is negligible since most of the 
time is spent in highly optimized vector operations.

When operations are done on individual objects Python is significantly 
slower than compiled languages but psyco is making great progress in this
area. It already approaches the performance of C for simple code using
only integers and floats.

   Oren





More information about the Python-list mailing list