This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g77 behaviour
- To: N8TM at aol dot com
- Subject: Re: g77 behaviour
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Wed, 28 Jul 1999 21:49:57 +0200
- CC: gborzi at oxygen dot unime dot it, gcc at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <bb348808.24d060d0@aol.com>
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