Marco Bodrato <bodr...@mail.dm.unipi.it> writes:

> While looking at this e-mail on gmp-bugs, I added DOS support and also
> reordered the branches around the exit code.
> Do you agree with those changes?

Looks reasonable to me. To be honest, it's a bit difficult to follow, it
seems I didn't document this that well when I wrote it back in 2008.

Some potential further improvements: It would likely be possible to order the
cases at the end as L(nul), L(one), L(two), and let the nul case fall
through into the one case, reducing the size a bit. And a mulx version
could likely eliminate a lot of the move instructions.

It's a somewhat obscure function, used only by
mpn_hgcd_mul_matrix1_vector. I think its performance matters mainly for
gcdext in the Lehmer size range. (It's also used by hgcd base case, but
for sizes where that is used, I'd guess that it's a pretty small part of
the complete gcd computation).

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to