Speed Comparison Perl Python & C

David M. Cooke cookedm+news at physics.mcmaster.ca
Tue Mar 2 21:15:19 EST 2004


At some point, beliavsky at aol.com wrote:
> Python is supposed to be easy (and in general I agree that it is), but
> your solution requires some knowledge of
>
> (1) how integer and floating point calculations are done (which many
> novices do not have)
> (2) when Psycho can speed things up
>
> and the final result is still much slower than Fortran. For the
> Fortran program, the only "trick" is the use of integer*8.

It's quite easy (using F2PY) to make Python wrapper around a Fortran
routine. So if you're in a situation where Fortran is much faster,
then use it. Wrap it in Python and slap a webserver and a GUI on
that puppy, and run rings around pure Fortran code.

[Heck, I'll cry if I ever have to write any serious user interface
code in Fortran. More than my sanity is worth.]

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca



More information about the Python-list mailing list