bit.mul10ΒΆ
x[:n] *= 10
@NOTE: this implementation works with both signed and unsigned numbers.
SignatureΒΆ
def mul10 n, x @ twice, end { ... }
Defined in bit/mul.fj β lines 5β15 (view on GitHub).
ComplexityΒΆ
Time:
n(14@+10)Space:
n(14@+10)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def mul10 n, x @ twice, end {
.shl n, x
.mov n, twice, x
.shl n, 2, x
.add n, x, twice
;end
twice:
.vec n
end:
}
Depends onΒΆ
Next: bit.mul_loop β