Two 10-lines functions
Niels Möller
nisse at lysator.liu.se
Wed Feb 3 11:34:59 CET 2010
bodrato at mail.dm.unipi.it writes:
> IIRC Niels suggested some time ago that we could try to split
> odd-limb-sized mulmod using bitwise shifts... Do I remember wrongly?
Right, we discussed that. We can consider that if/when we find some
application where the size for some can't be rounded up. For current
applications of wraparound arithmetic, I think it will be slower than
rounding the size up to a multiple of a suitable (small) power of two.
Shifting will add linear (i.e., O(n)) cost, while the cost for
increasing the product size a limb or two should be sublinear (above
schoolbook range, and at least on average).
Regardss,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
More information about the gmp-devel
mailing list