Re: Timing loop For !!

*To*: mathgroup at smc.vnet.net*Subject*: [mg60147] Re: [mg60111] Timing loop For !!*From*: stephen layland <layland at wolfram.com>*Date*: Sun, 4 Sep 2005 03:02:12 -0400 (EDT)*References*: <200509020833.EAA05924@smc.vnet.net> <200509030605.CAA19035@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

and thus spake NGUYEN Quang Tuong [2005.09.03 @ 01:31]: > Hi, > > I wrote a program in which i used the loop for to store the evaluation > of an expression ( in order to reduce the time of calculation ). But my > program is until slow. I would like to kwow if we can have another to > reduce the time of calculation. In general, For[], Do[], and While[] loops are slower than their functional equivalents in Mathematica. You can probably do what you want using Map[] and Table[]. Unfortunately the code you gave below is incomplete and makes no sense, so it's hard to say for sure. Try posting some more specific example code. Thanks! >Here in the loop for that i used. > > pmax=10; > > > Here TFHbulktotal is a function that is defined previously. And I'll > use Hkptotal[p,q] for the next calculation.. > > > nbdenormek=30; > nbdetheta=70; > normedekmin=0; > > > > > What I must do to replace the two loop For above to reduce the time of > calculation ?? > > Thanks a lot! > -- /*------------------------------*\ | stephen layland | | Documentation Programmer | | http://members.wri.com/layland | \*------------------------------*/

**References**:**DSolve problem***From:*"sunnewton" <sunshinenewton@gmail.com>

**Timing loop For !!***From:*NGUYEN Quang Tuong <quang-tuong.nguyen@lpn.cnrs.fr>