F_mpz_poly improvements

1 view
Skip to first unread message

Bill Hart

unread,
Nov 14, 2009, 5:44:20 PM11/14/09
to flint-devel
I've been busy coding up division routines for F_mpz_poly. At this
stage I've only been working on division in Z[x], not pseudo division.

I had to write up some mul_trunc_left routines and I've added a
basecase and divide and conquer routine for division in Z[x].

I also added a shiny new F_mpz_poly_div_exact, which does exact
division by working from one end with Hensel division and from the
other end using ordinary division. For sparse polynomials it is about
twice as fast as what we had before and for dense polynomials about
33% faster.

I also applied some optimisations to all the division code for the
case where you are doing an unbalanced division, i.e. dividing A by B
where len(A) < 2*len(B) - 1. It should be faster than the fmpz_poly
module in those cases now, though I didn't do any timings to confirm
that.

I'm not sure what is next. I think probably heuristic GCD. I have to
do pseudo division some time too I guess.

Bill.

Bill Hart

unread,
Nov 14, 2009, 5:46:40 PM11/14/09
to flint-devel
Actually I think that is wrong. For sparse division it might not be
faster at all. But I did timings for dense division and it is
definitely about 33% faster for fairly random length inputs.

Bill.
Reply all
Reply to author
Forward
0 new messages