| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Seems not to have any performance impact, but still, cleaner this way.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
As it turns out, the speed gained by lowering the number of digits in
divisor using repeated division is much less than the speed gained by
using multiplication of the dividend instead of division of divisor.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
In PasswordMaker, the numbers that are fed into long division can only
decrease. Therefore, skipping leading zeros is a rather reasonable
improvement.
|
| |
| |
| |
| |
| |
| | |
There are now 2 features that control the amount of precomputed
constants. They can either be 0, 12, or 256. Most users will likely want
to go with the 12, so this is the default feature.
|
| |
| |
| |
| |
| | |
It seems English doesn't use the word potency in this context, but
rather uses power.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The maximum power of the base that can fit into a given data type is
constant. There's no point in computing it at runtime, if we can just
store it in a compile-time constants array.
The code isn't the most beautiful, but that's mostly because Rust const
functions are still a bit limited.
One function was duplicated, because it was easy to get a slow version
to compile in const context, and const context doesn't really care...
|
|\| |
|
| |
| |
| |
| | |
It's not perfect, but a much better guess than previously.
|
| |
| |
| |
| |
| | |
Now that work on performance has started, accurate readings are
important.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The handling of overflows was non-performing before. Now it's performing
and correcting. This lets us skip a less-than check for N-digit numbers,
causing a slight performance improvement.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Speeds up the 20 and 32 byte cases. Has slightly negative impact for 16
byte case.
|
| |
| |
| |
| | |
Just to remove code duplication.
|
| | |
|
| |
| |
| |
| | |
That's a lot faster than division.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
to better match the names of similar functions.
|
| |
|
|
|
|
|
|
|
| |
Moved the basis conversion into a submodule, to ease the upcoming
rewrite.
Add a couple of new integration tests.
Fix a bug caused by misreading the PasswordMaker Pro HMAC code.
|
| |
|
| |
|
|
It's compiling, and the public interface is semi-OK now.
The internals are still a bit gory, but they'll likely see an iteartion
later on anyhow.
|