Hi Christian,

On Fri, 29 Jun 2012 00:10:32 -0700 (PDT)
Christian Stump <christian.st...@gmail.com> wrote:
> I want to do some computations with multivariate polynomials in the group W 
> of type H4 (14400 elements). I have a summand for every element w \in W, 
> and a product of 4 polynomials in each summand:
> 
> gens = []
> for obj in gens_objects:
>     p = 0
>     for w in W:
>         mon_w = F[obj][w][0] * F[obj][w][1] * F[obj][w][2] * F[obj][w][3]
>         p = p + mon_w
>     gens.append(p)
> return gens
> 
> for every obj, this takes about 10sec (doing the same computation in Magma 
> is about 4 times faster), and almost all the time is spend in all these 
> multiplications (I also tried prod( F[obj][w] ) and P.prod( F[obj][w] ) 
> where P is a polynomial ring in 8 variables, but both were slower. So my 
> question is if I can somehow do the complete construction of such a 
> generator p somehow directly in singular, and then turn it into a Sage 
> object only before appending it to gens?

Can you post a complete example, if possible including the Magma code
that you compare with? Feel free to email me personally if the files
are too big for the list.

I doubt if the multivariate polynomial arithmetic is so much slower,
the extra time could also be taken by all the lookups in F[obj][w][0].

In any case, constructing the polynomial directly in Singular should
take the same time as doing it from Sage, since Sage uses Singular as a
C-library.


Cheers,
Burcin

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to