hgcd1/2
Niels Möller
nisse at lysator.liu.se
Fri Sep 13 20:57:07 UTC 2019
tg at gmplib.org (Torbjörn Granlund) writes:
> tg at gmplib.org (Torbjörn Granlund) writes:
>
> I cooked a modern alternative:
>
> I went ahead and committed that version, replacing the old
> HGCD2_METHOD=2. I expect it is be the fastest method on some platform.
Will be interesting to see results on thresholds.
> (We might want to arrange for longlong.h to use lzcnt instead of bsr for
> modern AMD processors; the initial two count_leading_zeros would
> terminate in one cycle instead of 8 thereby!)
Looks like you did that too.
I've now tried the similar #if:ed out div2 code, and enabling it gives
an 8% speedup on my laptop.
Next, I think we should go ahead with the rename HGCD2_METHOD to
DIV11_METHOD or possibly HGCD2_DIV1_METHOD.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
More information about the gmp-devel
mailing list