CPU time for Solve under v.2.0 and 2.1
- To: mathgroup at yoda.physics.unc.edu
- Subject: CPU time for Solve under v.2.0 and 2.1
- From: yoda at ele.crl.melco.co.jp
- Date: Fri, 13 Nov 92 15:40:53 JST
Dear mma users,
here's an example of strange v.2.1 behavior when I try to solve
a matrix equation using the Solve command on my Mac IIci + a Tokamac 68040
board.
As we see, the same program below gives very different CPU time !!!
A bad part is that the v.2.1 gives 5 times longer CPU time !!!!!
Any comments are really welcome.
Kiyoshi Yoda
----- v.2.0 -------
Share[]
i0=1;
n=8;
va=Array[v,n];
Do[v[i]=0,{i,n-2,n}];
kktotal=Array[d,{n,n}];
Do[d[j+i,j]=d[j,j+i],{j,n},{i,n}]
Do[kktotal[[i]]=Table[0,{n}],{i,n-2,n}]
Timing[Solve[kktotal.va==ReplacePart[Table[0,{n}],i0,1],
{v[1],v[2],v[3],v[4],v[5]}]][[1]]
5.08333 Second
---------------------------------------------------------
----v. 2.1 ---------
Share[]
80960
i0=1;
n=8;
va=Array[v,n];
Do[v[i]=0,{i,n-2,n}];
kktotal=Array[d,{n,n}];
Do[d[j+i,j]=d[j,j+i],{j,n},{i,n}]
Do[kktotal[[i]]=Table[0,{n}],{i,n-2,n}]
Timing[Solve[kktotal.va==ReplacePart[Table[0,{n}],i0,1],
{v[1],v[2],v[3],v[4],v[5]}]][[1]]
27.2333 Second
----------------------------------------------------------
***************************************
* Kiyoshi Yoda, Ph.D *
* *
* Mitsubishi Electric Corporation *
* Central Research Laboratory *
* 8-1-1 Tsukaguchi-Hommachi *
* Amagasaki, 661 Japan *
* *
* yoda at ele.crl.melco.co.jp *
* domestic phone: 06-497-7130 *
* domestic fax : 06-497-7288 *
* international fax: +81-6-497-7288 *
***************************************