Form is really slow and fast for me. What could this mean?

parisse parisse at mozart.ujf-grenoble.fr
Thu Mar 28 20:03:56 CET 2002


> I tried downloading form3.0, and I find it mysterious.  Maybe I am not 
> using
> it correctly.  My first version took 101.23 seconds. I repeated it and 
> it took 97 seconds
> 
> This is what I did:
> 
> C:\form>form sample3.frm
> form sample3.frm
> FORM by J.Vermaseren,version 3.0(Jan 28 2001) Run at: Thu Mar 28 
> 10:26:41 2002
>     Symbols x,y,z;
>     Local q=(1+x+y+z)^20;
>     Local q1=q+1;
>     Local res=q*q1;
>     .end
> .....
> This changed program however took only
> 0.98 second:
> 
> C:\form>form sample7.frm
> form sample7.frm
> FORM by J.Vermaseren,version 3.0(Jan 28 2001) Run at: Thu Mar 28 
> 10:50:53 2002
>     Symbols x,y,z;
>     Local q2=(1+x+y+z)^20*(1+(1+x+y+z)^20);
>     .end
> 
> 
> Time =       1.04 sec    Generated terms =      14112
> 
>                q2        Terms in output =      12341
> 
>                          Bytes used      =     305378
> 


The reason might be that the first power is expanded as
(1+x+y+z)*(1+x+y+z)*...*(1+(1+x+y+z)*...*(1+x+y+z)) which will expand
much faster than making the product of 1+x+y+z expanded.
This would be the same reason why it is never a good idea
to use the chinese powering algorithm for expansion of power
of multivariate polynomials.




More information about the GiNaC-devel mailing list