alloy-rs / alloy-rs/ruint

`algorithms/gcd/matrix`: We can avoid the temporary if we implement a dedicated matrix

Aperta
#118 0 commenti 0 reazioni 1 assegnatario Rivendicata da @recmo Vedi su GitHub
optimize tracker
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.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.