Bill Allombert on Sat, 16 Jan 2016 14:40:05 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Faster exponentiation in some extensions of finite fields of small characteristics


On Fri, Jan 15, 2016 at 06:35:06PM +0100, Peter Bruin wrote:
> Hello Jean-Pierre,
> 
> > May I ask why you reverse the array of coeffs when packing it into an
> > integer in the kron_pack_Flx_spec functions you added?
> > Do the fromdigits function reverse it another time?
> 
> Yes, the reason is the existing convention for fromdigits.  I did not
> want to write another copy of fromdigits with the only difference being
> the order of the digits.  I did not try to to find out whether this
> would give a noticeable speed improvement.

Is kron_pack_Flx_spec actually useful ? 

Polynomial multiplication is independent of coefficients order,
so it is not necessary to repack. Indeed Flx_mulspec_mulii does
not do it:

INLINE GEN
Flx_mulspec_mulii(GEN a, GEN b, ulong p, long na, long nb)
{
  GEN z=muliispec(a,b,na,nb);
  return int_to_Flx(z,p);
}

Cheers,
Bill.