Shared toom evaluation functions
Niels Möller
nisse at lysator.liu.se
Thu Nov 19 15:19:24 CET 2009
Torbjorn Granlund <tg at gmplib.org> writes:
> I think we might want to make our lives in toom more difficult:
>
> We should add, to gmp-mparam.h, cycle counts for available mpn functions
> as first degree polynomials. Measurements for that can easily be added
> to tuneup.c.
I was about to suggest something similar, but a little simpler, with
only a cycles/limb value for each of the O(n) functions. Do you think
the constant overhead is important here?
The first conditional (add_n_sub_n, which I guess should always be
used when available natively) appears in toom32_mul. It's more
relevant for the variuos interpolation functions, i.e., from
toom33/toom42 and up, where there are several possible strategies for
division and multiplication by constants.
My gut feeling is that the constant term shouldn't be so significant
for the choices for toom interpolation.
/Niels
More information about the gmp-devel
mailing list