[RFC][PATCH] mini-gmp: move memory allocation out of loops
bodrato at mail.dm.unipi.it
Sat Feb 10 18:50:31 UTC 2018
Il Sab, 10 Febbraio 2018 6:11 pm, Niels Möller ha scritto:
> I've run some tests and checked in.
Before your patch, lcov counted 25088342 calls to gmp_xalloc_limbs, now it
counts 14052549. Not bad.
[ https://gmplib.org/devel/lcov/shell/gmp/mini-gmp/mini-gmp.c.gcov.html#329 ]
> Maybe the below is a reasonable way (note that the #if:ed out
> mpn_div_qr_2 can't be easily supported with this interface).
Seems ok to my eyes, it simplifies the code.
More information about the gmp-devel