Memory usage for large multiplications

Niels Möller nisse at
Mon Jan 18 21:33:14 CET 2010

The below patch changes the interface of mpn_mulmod_bnm1, and reduces
the amount of temporary storage needed for mpn_nussbaumer_mul (used for
large products). Passes make check for me, but there are some missing

1. Update of the code for the non-recursive case (marked XXX in the

2. Squaring. Rather than doing the analogous changes to mpn_sqrmod_bnm1,
   I'd rather break out the CRT logic to a separate, shared, function.

3. An mpn_sub_nc which should be replacable by some cheaper logic
   (marked FIXME).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mulmod_bnm1.patch
Type: text/x-patch
Size: 10476 bytes
Desc: not available
URL: <>
-------------- next part --------------

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