This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77 behaviour


N8TM@aol.com wrote:

> In a message dated 99-07-28 06:46:50 EDT, gborzi@oxygen.unime.it writes:

> <<        do 10 j=1,k
>          x0=x0-a(j)*x(laij(j)-l)
>  10      continue >>

> Sum accumulation in a non-static local is still optimized more reliably by
> gnu compilers than accumulation in an array element. 

Yep, but for a factor of three performance difference I would be looking
somewhere else.

This might be an alignment problem:  If the x array is misaligned, the
original code will draw three unaligned accesses (two reads and one
write) and this only one.

This (hopefully) is all solved by the upcoming gcc-2.95.

Hope this helps,

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://world.std.com/~burley/g77.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]