Bill Allombert on Thu, 07 Sep 2017 18:53:43 +0200


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

Re: Speed up RgX_mul, RgX_sqr, RgX_divrem over Z, Fp, FpXQ


On Tue, Sep 05, 2017 at 10:43:01PM +0200, Bill Allombert wrote:
> On Tue, Aug 29, 2017 at 03:28:30PM +0200, Peter Bruin wrote:
> > Hi Bill,
> > 
> > One more thing: starting with commit 4a80b98, multiplication of FpX
> > (which moved from RgX_mul/RgX_sqr to the new functions RgX_mul_FpX/
> > RgX_sqr_FpX in that commit) removes the special case for Flx that was
> > introduced in commit b770112.  Was this intentional?
> 
> Yes, sorry, I forgot to mention it.
> 
> >  It does make a
> > noticeable difference, see below.  One way to fix this is as in the
> > attached patch; alternatively, one could of course try to speed up
> > FpX_mul/FpX_sqr.
> 
> Normally FpX functions are calling Flx function for small p but this
> is not done for FpX_mul.
> 
> However relying on that for RgX functions is not entirely satisfying
> because this leads to a double conversion RgX->FpX->Flx
> Thanks to your patch a direct conversion RgX->Flx occurs.
> 
> But it makes sense for FpX_mul to call Flx_mul when possible
> for consistency.

This is done now.

Cheers,
Bill.