Using Python for programming algorithms

sturlamolden sturlamolden at yahoo.no
Tue May 20 13:01:53 EDT 2008


On May 19, 10:42 pm, "bruno.desthuilli... at gmail.com"
<bruno.desthuilli... at gmail.com> wrote:

> Well... They do - they are called 'C compilers' !-) As Roel Schroven
> mentioned - and he is at least partially right on this point - C has
> been designed to make optimizing C compiler not to hairy to write.

C has proven very difficult to optimize, particularly because pointer
aliasing prevents efficient register allocation.

Fortran was designed with ease of optimization in mind. Not many years
ago, it was not uncommon for Fortran code to run twice as fast as
equivalent C. C compilers have recently closed on on the gap by
becoming extremely good at what they do. But that is not because C is
easy to optimize. On the contrary.

For serious number crunshing, there is nothing that compares to
Fortran, even today. f2py makes it easy to call Fortran subroutines
from Python.








More information about the Python-list mailing list