From: Raffaele Vitolo <raffaele.vitolo@un...>  20120924 08:25:00

Dear All, I am summing large numbers of monomials (~12000) indexed by an operator `c' as coefficient. The resulting expression will be of the type c(1)*mon1 + c(2)*mon2 + ... Taking these sums seems to be extremely timeconsuming: on my server it took 8.5 hours, and this is the slowest part of my computations. I used the following syntax: % Loads the file with the monomials; it is a list % `linoddt' of about 12000 monomials in "kz3d_linoddt.red"$ % Counter for the coefficients: ctel := 0 $ % Operator for the coefficients: operator c $ % Sum of the monomials: ct:=(for each el in linoddt sum (c(ctel:=ctel+1)*el))$ If you are interested you might find the monomials here (~450k): http://poincare.unisalento.it/vitolo/tempo/kz3d_linoddt.red My question is: it is possible to speed up this sum? Or is this operation so intrinsically complex that it is not possible to do better? Thanks in advance! Raffaele Vitolo.  