 
 
 
 
 
 
CALCULATION TIME
- To: mathgroup at smc.vnet.net
- Subject: [mg21418] CALCULATION TIME
- From: Blimbaum Jerry DLPC <BlimbaumJE at ncsc.navy.mil>
- Date: Thu, 6 Jan 2000 01:46:34 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
	I have some code performing (roughly) the following Do Loops:
	Do[.........
                     Do[x[[m,n+1]] = x[[m,n]] + B*       y[[n+m-1]]*e[[n]]
 
----------------------------------------------,
 
eps+Sum[y[[n-q]]^2,{q,0,M-1}]
                  {m,M}        ],
                {n,M,Length[y]}]
	where y, e are lists (y is data that contains about 30000 elements),
etc.     Running a data set takes about 10.5 secs.  I wanted to shorten the
time but couldnt figure out how to write it either in Nest or Compile form
so I went thru it piece meal to see if I could find a culprit and from this
I noticed if I replace the Sum term in the denominator by a number, lets say
1, and then perform the calculations it only takes about 2.5 seconds!   I
did a sample Sum[expr^2] with a similar Do loop separately and it takes no
time at all.
	What is wrong?
	thanks.   Jerry Blimbaum    NSWC   Panama City, Fl

