`algorithms/gcd/matrix`: We can avoid the temporary if we implement a dedicated matrix
- Lingua principale
- Rust
- Stelle
- 225
- Fork
- 70
- Merge medio
- 16h 54m
- PR unite (30g)
- 8
Descrizione
*On 2022-06-06 @recmo wrote in [`4c74c09`](https://github.com/recmo/uint/commit/4c74c09b4d6f425cda931e9f5e8d00f1367c4261) “Merge pull request #110 from recmo/gcd”:*
We can avoid the temporary if we implement a dedicated matrix
multiplication.
```rust
b: &mut Uint,
) {
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,
)
```
*From [`src/algorithms/gcd/matrix.rs:45`](https://github.com/recmo/uint/blob/4c74c09b4d6f425cda931e9f5e8d00f1367c4261/src/algorithms/gcd/matrix.rs#L45)*
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.