MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: speed of multiplying polynomials

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72560] Re: speed of multiplying polynomials
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Mon, 8 Jan 2007 05:08:42 -0500 (EST)
  • References: <enpste$e5t$1@smc.vnet.net>

Don't judge Mathematica for a specific performance. It is the overal
that makes her better for other CAS. For example compare the obtained
results by Symbolic Integration of Definite Integrals and you will be
quite impressed about its skills.
Anyway, it just happens some CAS to be better on one task, some on
another.

To tell you the truth I believed (and I still believe somehow!)
Mathematica can achieve better performance here contrary to my
findings...
May be someone will suggest a better way!

In[64]:=
Plus @@ Table[Random[Integer, {0, 1000}]*x^i, {i, 0, 1000}]
Plus @@ Table[Random[Integer, {0, 1000}]*x^i, {i, 0, 1000}]

In[69]:=
Timing[Collect[%*%%, x]][[1]]
Out[69]=
2.3279999999999745*Second

(CPU 2.8 GHz)





dmharvey at math.harvard.edu wrote:
> Hi,
>
> I'm trying to figure out how fast mathematica can multiply polynomials
> with integer coefficients. I don't know mathematica well at all, but I
> had a friend write me a mathematica program to test this. It look like
> on a regular desktop machine it can multiply e.g. degree 1000
> polynomials with coefficients in the range 0 <= x <= 1000 in about 1.3
> seconds.
>
> This is ludicrously slow compared to some other computer algebra
> systems, which can do this multiplication in about 0.0003
> seconds. I can't believe mathematica is in the order of 10000 times
> slower for this simple task. I think perhaps we are doing something
> wrong. Can anyone suggest a way of coaxing mathematica into doing this
> kind of arithmetic at a comparable pace?
> 
> Many thanks
> 
> David


  • Prev by Date: Re: A pattern matching problem
  • Next by Date: RE: question on Plot and Show plus Axis Labels:
  • Previous by thread: Re: speed of multiplying polynomials
  • Next by thread: Re: speed of multiplying polynomials