gcd_22

Marco Bodrato bodrato at mail.dm.unipi.it
Sat Aug 31 13:22:21 UTC 2019


Ciao,

Il Mer, 28 Agosto 2019 11:39 am, Torbjörn Granlund ha scritto:
> Marco Bodrato <bodrato at mail.dm.unipi.it> writes:

>   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.

I implemented it, you can find it attached.

The funny thing is that with the attached code, all the chain gcd_55 ->
lowz -> gcd_44 -> lowz -> gcd_33 -> lowz is handled with tail calls.
On the other side, a great part of the code is duplicated, but it can not
exploit the fixed-size shortcuts... I'm not that sure the resulting code
is useful.

Ĝis,
m

-- 
http://bodrato.it/papers/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcd-mpn.c
Type: text/x-csrc
Size: 5031 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20190831/44ccda03/attachment.bin>


More information about the gmp-devel mailing list