Re: Automatically transform or expand do loop in a subroutine
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Wed, 30 Jan 2008 23:25:01 -0800
highegg <highegg@xxxxxxxxx> wrote:
On Jan 31, 7:06 am, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
yaqi <yaqiw...@xxxxxxxxx> wrote:certainly not. c = c + d*(d+1)/2, more likely :)
I want to save computing time as much as I can.
...
do i=1,d
c = c + i
end do
The "obvious" way to save a lot of computing time here is to replace the
loop with
c = c + d*i
Um. Er. Right.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: Automatically transform or expand do loop in a subroutine
- From: Dr Ivan D. Reid
- Re: Automatically transform or expand do loop in a subroutine
- From: Tim Prince
- Re: Automatically transform or expand do loop in a subroutine
- References:
- Automatically transform or expand do loop in a subroutine
- From: yaqi
- Re: Automatically transform or expand do loop in a subroutine
- From: Richard Maine
- Re: Automatically transform or expand do loop in a subroutine
- From: highegg
- Automatically transform or expand do loop in a subroutine
- Prev by Date: Re: Automatically transform or expand do loop in a subroutine
- Next by Date: Re: Automatically transform or expand do loop in a subroutine
- Previous by thread: Re: Automatically transform or expand do loop in a subroutine
- Next by thread: Re: Automatically transform or expand do loop in a subroutine
- Index(es):