Re: forall and do loop
- From: highegg <highegg@xxxxxxxxx>
- Date: Fri, 27 Jul 2007 06:27:23 -0000
On Jul 27, 7:56 am, aeroguy <sukhbinder.si...@xxxxxxxxx> wrote:
thanks for the reply. My main concern in this program test is not
about low level compiler but to know which coding practise is
effecient in a general sense. I mean, which code will be better
optimized by the compiler if i choose to use the compiler optimization
option.
Yes, that's exactly what Sebastian tried to warn you about.
I second to that: do _not_ try to adjust your coding practices
to compiler optimizations. These change if you switch compiler,
and they also change as time goes by (improve, hopefully :).
Do not regard the "programming for speed" (or similar, this one is
from Intel's) section of manual as recommended coding practices,
but rather like a cookbook what to try if you want to deal with a
bottleneck.
For instance, 10 years back (I'm guessing) it was not wise
to do
y = matmul(transpose(A),x)
because a temporary was created for transpose.
Today, most compilers do TRANSPOSE in-place by descriptor
manipulation, and some also optimize MATMUL so that it detects a
TRANSPOSEd argument and uses optimized code for that case.
.
- References:
- forall and do loop
- From: aeroguy
- Re: forall and do loop
- From: Sebastian Hanigk
- Re: forall and do loop
- From: aeroguy
- forall and do loop
- Prev by Date: Re: convert f77 code from mixed case to lower case
- Next by Date: Re: forall and do loop
- Previous by thread: Re: forall and do loop
- Next by thread: Re: forall and do loop
- Index(es):
Relevant Pages
|