Fortran vs Python - Newbie Question

Beliavsky beliavsky at aol.com
Mon Mar 26 18:57:31 EDT 2007


On Mar 26, 8:42 am, Jean-Paul Calderone <exar... at divmod.com> wrote:

<snip>

> You can get the speed of fortran in Python by using libraries like
> Numeric without losing the readability of Python.

Numeric and Numpy will faster than raw Python for array operations,
but I don't think they will match well-written C or Fortran, because
compilers can better optimize code in those "less dynamic" languages.

Someone recently mentioned here ("Quantum term project code- for
interest and for help") an example where Numeric was 180 times faster
in Fortran 95 using gfortran, asking for advice on how to speed up the
Python code -- see
https://wiki.asu.edu/phy416/index.php/A_Simple_Bose-Einstein_Condensate_Simulation
. No one replied.





More information about the Python-list mailing list