diff options
author | Andreas Grois <andi@grois.info> | 2022-10-26 17:59:27 +0200 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2022-10-26 17:59:27 +0200 |
commit | 839e1096dde8e1e934a82d1cf0c4d3a43dc69f38 (patch) | |
tree | 403ef9fc734048cd390fd68fce394e6d8ef5f8b5 /src/passwordmaker/base_conversion/mod.rs | |
parent | 3ed6afab610907a29bb2b9fac0516d918bec333e (diff) |
Use MulAssign in BaseConversion.
Benchmarks show that MulAssign is quite a bit faster than Mul,
especially since in this case it's mathematically proven that the
multiplication cannot overflow.
Also, removed skipping of leading zeros in long division. With the
switch to multiplication after the first iteration, the chance that
there actually are any leading zeros is on the order of 2^-26.
I think at least. In any case, it's small.
Diffstat (limited to 'src/passwordmaker/base_conversion/mod.rs')
0 files changed, 0 insertions, 0 deletions