Basecases of mulmod_bnm1.c and sqrmod_bnm1.c

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Tue Sep 3 16:32:20 CEST 2013


Ciao,

Il Gio, 29 Agosto 2013 6:06 pm, Torbjorn Granlund ha scritto:
> Why do we call mpn_mul, mpn_mul_n, and mpn_sqr in the bnm1 functions'
basecases?
>
> I'd say we should call mpn_mul_basecase and mpn_sqr_basecase instead,
for a few cycles less overhead.
>
> It seems MUL_TOOM22_THRESHOLD > MULMOD_BNM1_THRESHOLD and
> SQR_TOOM2_THRESHOLD > SQRMOD_BNM1_THRESHOLD for all machines.

True, but the condition ((rn & 1) != 0) can hold even above the thresholds.

-- 
http://bodrato.it/






More information about the gmp-devel mailing list