Re: forall and do loop
- From: highegg <highegg@xxxxxxxxx>
- Date: Fri, 27 Jul 2007 07:31:37 -0000
On Jul 27, 9:09 am, aeroguy <sukhbinder.si...@xxxxxxxxx> wrote:
Thanks guys. Ok so i don't want to manually modify my code for any
optimization?
No, you just don't want to tune your code for _every_ optimization.
Usually more than 90% time is spent in less than 10% code, that's
where you should can consider manual optimizations. An "auto-
optimizing coding style" usually does more damage than good.
Of course, you need to find the bottlenecks. They are usually located
in nested loops (or array expressions within loops) - look for those.
If you learn how to use a profiler, your chances will vastly increase.
Try isolating the bottlenecks into separate subroutines - that can
simplify optimizations by driving out aliasing issues. (the golden
aliasing rule of Fortran)
But then there are these two ways to do so...which one
should be followed. Both are correct ? right? Then how should i
determine which one i should use.... why i should give the first
preference or the latter one?
Use the one that appears more clear to you - easier to read and/or
write.
.
- Follow-Ups:
- Re: forall and do loop
- From: Tim Prince
- Re: forall and do loop
- From: aeroguy
- Re: forall and do loop
- References:
- forall and do loop
- From: aeroguy
- Re: forall and do loop
- From: glen herrmannsfeldt
- Re: forall and do loop
- From: aeroguy
- forall and do loop
- Prev by Date: Re: forall and do loop
- 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
|