Python is far from a top performer according to benchmarktest...

Tim Peters tim.one at comcast.net
Mon Jan 12 18:10:04 EST 2004


[Lothar Scholz]
>> Fortran does not have this problem so a lot of optimizations can be
>> done and values can be hold in registers for a much longer time,
>> resulting in much greater speed.

[Robin Becker]
> I'm not sure I agree with the above. Aliases could certainly occur in
> fortran 77, I haven't used 90 so can't say for sure.

That's the magic of Fortran:  the F77 standard says (in part):

    If a subprogram reference causes a dummy argument in the
    referenced subprogram to become associated with another
    dummy argument in the referenced subprogram, neither
    dummy argument may become defined during execution of
    that subprogram.

It bascially says you can alias all you want, so long as you only read the
aliased entities and don't modify them.  If effect, if you do anything with
aliases that would inhibit optimizations that assume there isn't any
aliasing, then it's your *program* that's not legitimate Fortran.  The
Fortran standard has lots of text "like that", imposing (often unenforcable)
restrictions on conforming programs for the benefit of optimizing compilers.
That was the right choice for Fortran's audience.





More information about the Python-list mailing list