uint
uint copied to clipboard
`algorithms/gcd/matrix`: We can avoid the temporary if we implement a dedicated matrix
On 2022-06-06 @recmo wrote in 4c74c09
“Merge pull request #110 from recmo/gcd”:
We can avoid the temporary if we implement a dedicated matrix multiplication.
b: &mut Uint<BITS, LIMBS>,
) {
if BITS == 0 {
return;
}
// OPT: We can avoid the temporary if we implement a dedicated matrix
// multiplication.
let (c, d) = if self.4 {
(
Uint::from(self.0) * *a - Uint::from(self.1) * *b,
Uint::from(self.3) * *b - Uint::from(self.2) * *a,
)