The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: PolynomialQuotient slow
Replies: 3   Last Post: Jan 7, 2013 12:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Daniel Lichtblau

Posts: 1,761
Registered: 12/7/04
Re: PolynomialQuotient slow
Posted: Jan 7, 2013 12:35 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.