Fortran vs Python - Newbie Question

sturlamolden sturlamolden at yahoo.no
Mon Mar 26 11:40:00 EDT 2007


On Mar 26, 3:20 pm, "Noma... at gmail.com" <Noma... at gmail.com> wrote:

> I've been told that Both Fortran and Python are easy to read, and are
> quite useful in creating scientific apps for the number crunching, but
> then Python is a tad slower than Fortran because of its a high level
> language nature, so what are the advantages of using Python for
> creating number crunching apps over Fortran??

Fortran may be faster, but Python (with NumPy and SciPy) is often fast
enough. A lot of practitioners use Matlab, which is often slower than
Python. Matplotlib is an excellent Python extension for graphing
data.

Anyone serious about numerical computing should learn Fortran 95. But
use it sparsely and only where its needed. Fortran is perfect for
numerical work but useless for anything else. Usually the amount of
code that will benefit from using Fortran over NumPy makes up less
than a percent of the line count. You can call Fortran from Python
using f2py, so you can get the best from both worlds.










More information about the Python-list mailing list