Hello, I have done minor updates for the giac interface. (trac 10940) I got the following bench with it: On a: model name : Intel(R) Core(TM)2 Duo CPU E4700 @ 2.60GHz with sage 4.6.2 compiled from sources and the giac spkg: http://www-fourier.ujf-grenoble.fr/~parisse/giac/giac-0_9_1.spkg (this spkg was installed without cocoa nor hevea nor extra tex)
I got the following bench for the interface for some multivariate gcd Is there anotherway to compute gcd in sage? best Frederic --------------------------------------------------------------------- sage: R.<x,y>=QQ[] sage: l=[R.random_element(15,30),R.random_element(10,50),R.random_element(30,50),R.random_element(20,50)] sage: gl=giac(l) sage: wt=walltime();t=giac.cputime();gf1=(gl[0]*gl[1]).normal();giac.cputime(t);walltime(wt) -1.1368683772200001e-13 0.010113000869750977 sage: wt=walltime();t=cputime(); f1=l[0]*l[1] ; cputime(t);walltime(wt) 0.0 0.0010118484497070312 sage: giac(f1).nops;gf1.nops(); sage: wt=walltime();t=giac.cputime();gf2=(gl[3]*gl[1]).normal();giac.cputime(t);walltime(wt) 0.0099999999998800007 0.019656896591186523 sage: wt=walltime();t=cputime(); f2=l[3]*l[1] ; cputime(t);walltime(wt) 0.0040010000002439483 0.0025229454040527344 sage: sage: wt=walltime();t=giac.cputime();gf12=gf1.gcd(gf2);giac.cputime(t);walltime(wt) 0.02 0.028865814208984375 sage: gf12.degree()-gl[1].degree() 0 sage: wt=walltime();t=cputime(); f12=gcd(f1,f2) ; cputime(t);walltime(wt) 1.5840990000001511 1.5869238376617432 sage: (f12/gf12).normal() 1 sage: ################################### #rapport >700 (3 essais) sage: R.<x,y,z>=QQ[] sage: l=[R.random_element(7,30),R.random_element(10,15),R.random_element(10,30),R.random_element(10,30)] sage: gl=giac(l) sage: wt=walltime();t=giac.cputime();gf1=(gl[0]*gl[1]).normal();giac.cputime(t);walltime(wt) 0.0099999999999899995 0.014853954315185547 sage: wt=walltime();t=cputime(); f1=l[0]*l[1] ; cputime(t);walltime(wt) 0.0 0.00037312507629394531 sage: giac(f1).nops;gf1.nops(); sage: wt=walltime();t=giac.cputime();gf2=(gl[3]*gl[1]).normal();giac.cputime(t);walltime(wt) 0.0 0.010710954666137695 sage: wt=walltime();t=cputime(); f2=l[3]*l[1] ; cputime(t);walltime(wt) 0.0 0.00046610832214355469 sage: wt=walltime();t=giac.cputime();gf12=gf1.gcd(gf2);giac.cputime(t);walltime(wt) 0.02 0.025274991989135742 sage: wt=walltime();t=cputime(); f12=gcd(f1,f2) ; cputime(t);walltime(wt) 57.295579999999518 58.063894987106323 sage: (f12/gf12).normal() -1 #################################### #Un exemple limite pour sage: rapport >40000 sage: A.<x,y,z,t>=QQ[] sage: R.<x,y,z,t>=ZZ[] sage: l=[A(R.random_element(7,10)),A(R.random_element(10,15)),A(R.random_element(10,20))] sage: gl=giac(l) sage: wt=walltime();t=giac.cputime();gf1=(gl[0]*gl[1]).normal();giac.cputime(t);walltime(wt) 0.0 0.0075490474700927734 sage: wt=walltime();t=cputime(); f1=l[0]*l[1] ; cputime(t);walltime(wt) 0.0 0.00021696090698242188 sage: giac(f1).nops;gf1.nops(); sage: wt=walltime();t=giac.cputime();gf2=(gl[2]*gl[1]).normal();giac.cputime(t);walltime(wt) 0.0 0.0078761577606201172 sage: wt=walltime();t=cputime(); f2=l[2]*l[1] ; cputime(t);walltime(wt) 0.0 0.00025606155395507812 sage: wt=walltime();t=giac.cputime();gf12=gf1.gcd(gf2);giac.cputime(t);walltime(wt) 0.02 0.038819789886474609 sage: wt=walltime();t=cputime(); f12=gcd(f1,f2) ; cputime(t);walltime(wt) 1635.1781920000003 1637.7164239883423 sage: (f12/gf12).normal() -1 ---------------------------------------------------------------------- | Sage Version 4.6.2, Release Date: 2011-02-25 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: x,y,z=tuple(giac('x,y,z')) sage: f=(x+y+z+1)^33+1 sage: time p=(f*(f+1)).normal() CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s Wall time: 0.52 s sage: p.nops() 52394 sage: time p.factor().nops() CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s Wall time: 7.85 s 5 -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org