Re: gcd_22

2019-08-24 Thread Torbjörn Granlund
Now we have a nice set of x86_64 gcd_22.  The code is not as well tuned
as the gcd_11 code, but it runs somewhat fast.

I haven't explored the table based variant which gives 3 bits of
progress per iteration.  It might make the new code obsolete for
machines with fast multiply.

Now what?  Should we have gcd_33, gcd_44, and gcd_55 also?  :-) (It is
clear that these could improve speed greatly, and with the gcd_22 code
they would not be hard to write these.  Well, gcd_44 and above would not
be able to keep things in the 15 usable registers of x86_64.)

-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel


Re: gcd_11 asm

2019-08-24 Thread Marco Bodrato
Ciao,

Il Sab, 24 Agosto 2019 12:14 am, Torbjörn Granlund ha scritto:
> "Marco Bodrato"  writes:

>   It is not elegant, I agree, but maybe joining them both in a single
>   .asm file, so that the jump is local?
>
> We might do that, but it makes things a lot more complicated as there

The mpn_gcd_11_for_gcd_22 entry point proposed by Niels is much more
elegant than my workaround...

>   Even if... maybe I'd call them _1o1o and _2o2o, as someone suggested :-)
>
> Do you want an entry point also for _22 which accepts even operand(s)?

No, but I usually like a little bit of coherence in the naming convetions,
so that I do more easily remember the exceptions in the calling
conventions :-)

Ĝis,
m

___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel