Marco Bodrato <bodr...@mail.dm.unipi.it> writes: Maybe tail-call?
When up[0] == 0 but U is not zero and we can not return the result... That's an unlikely case, but it means that one of the operands gets much smaller than the other. Maybe a special strategy can be used in this case? Maybe a division, maybe a 2-adic division, or maybe simply a loop that knows that U will be smaller until also V will be one (some) limb shorter... ...and finally tail-call to the smaller fixed-size asm function? I think this is a good proposal. It is not certain that u-v with its new low-order limb zero is smaller than v. But it it is not, we can go to the next smaller algorithm directly, I assume. Here is what I have now. Feel free to improve it!
gcd-mpn.c
Description: Binary data
-- Torbjörn Please encrypt, key id 0xC8601622
_______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel