Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: PolynomialQuotient slow

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129344] Re: PolynomialQuotient slow
  • From: danl at wolfram.com
  • Date: Mon, 7 Jan 2013 00:35:34 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kbtbip$cph$1@smc.vnet.net> <kc2pi2$md9$1@smc.vnet.net> <kc8k29$b15$1@smc.vnet.net>

On Saturday, January 5, 2013 1:17:29 AM UTC-6, Roman Pearce wrote:
> Thanks Daniel, the internal routine seems to be what I want, as its time 
is comparable to Expand.  And it is parallelized?  This is very nice work. 
 Can I ask if it is recursive or distributed?  I'd appreciate any references where I can read about it.

It is using the sparse recursive form.

The speed derives use of GMP integers rather than explicit Mathematica integers. Not much difference between these; the main thing is the memory management. At least that's what I've been told. From your experiments I guess it may also be using multiple processors. Offhand I do not see how, but it's Sunday...

The person to ask if you want more detail would be Adam Strzebonski. I don't think there is anything going on other than what I noted above, but if there is something smart in parallelization then yes, that would warrant more detail (at least, more than I can provide).


> Two things we noticed were that ExactQuotient sometimes uses more threads and gets better speedup than Expand, so it may be possible to improve Expand, and Factor doesn't seem to use the parallel algorithms which is something to consider if you haven't already.

I am not sure what the plan is there. It's a large job to tackle. But I agree the potential for improvement is substantial. I should add that to some extent it is already in Factor, and has been for a very long time. That is to say, the underlying sparse recursive division has been there. (I believe) the bulk of the further improvement comes from having GMP handle the allocation/deallocation stuff. It is this aspect that, I think, is not at this time inside Factor.


> f = Expand[ (1+x+y+z+t)^30+1 ]; g = f+1;
>
> AbsoluteTiming[ p = Algebra`IPExpand[ f g ]; ]
>
> AbsoluteTiming[ q = Algebra`IPExactQuotient[ p, f ]; ]
>
>
>
> We were also excited to see some of the other core algorithm improvements in Mathematica 9.  I think you have a very strong release here.  All the best in the new year :)

Same to you, Roman. Feel free to sent a note off-line if this does not cover all your questions.

Regards,
Daniel



  • Prev by Date: Re: Precision
  • Next by Date: Re: Precision
  • Previous by thread: Re: PolynomialQuotient slow
  • Next by thread: How to get the Real and Imaginary part of an expression