Re: Similar systems, different performance of fortran code
Victor Munoz <vmunoz@macul.ciencias.uchile.cl> writes:
> >
> > Not exactly what I'd call "similar." The difference in speed could
> > easily be due to differences in code generation of the two compiler
> > versions.
> >
>
> Possible, that was my first thought, but other Fortran code I've tested
> performs equal or better in the g77-3.3 case. I'm not using any optimization
> flags either.
Why are you not using optimization? It is possible that g77-3.3
generates very inefficient code without optimization. A plausible
(but could be highly wrong) explaination is that different compiler
versions generate different basic code representations. The 3.3
representation may be highly inefficient in and of itself, but also be
amenable to its optimization routines.
> When I said "similar", I was thinking of RAM memory, CPU speed, and
> such. Not compilers. But anyway, it's surprising that this
> particular piece of code performs so badly in the newest
> version. I'll check more versions on both machines, to check this.
Sometimes the compiler does weird things. I've notice steady average
improvement in optimized code for gcc, but this doesn't mean that some
cases do not get worse.
--
Johan KULLSTAM
Reply to: