Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Minor, remove a pointless type conversion. | Andreas Grois | 2022-10-26 | 1 | -3/+3 |
| | | | | Seems not to have any performance impact, but still, cleaner this way. | ||||
* | Use MulAssign in BaseConversion. | Andreas Grois | 2022-10-26 | 2 | -8/+46 |
| | | | | | | | | | | 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. | ||||
* | Increment version to 0.2.0 | Andreas Grois | 2022-10-26 | 1 | -1/+1 |
| | |||||
* | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-26 | 1 | -0/+27 |
|\ | |||||
| * | Set up rust.yaml for GitHub Actions | Andreas Grois | 2022-10-26 | 1 | -0/+27 |
| | | | | | | This is just a bare-bone default setup. | ||||
* | | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-25 | 1 | -1/+2 |
|\| | |||||
| * | Minor: Update description in Cargo.tomlv0.1.0 | Andreas Grois | 2022-10-25 | 1 | -1/+2 |
| | | |||||
* | | Base Conv: Mul dividend instead of div divisor. | Andreas Grois | 2022-10-25 | 1 | -2/+17 |
| | | | | | | | | | | | | 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. | ||||
* | | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-24 | 1 | -1/+1 |
|\| | |||||
| * | Improve long division performance. | Andreas Grois | 2022-10-24 | 1 | -1/+1 |
| | | | | | | | | | | | | In PasswordMaker, the numbers that are fed into long division can only decrease. Therefore, skipping leading zeros is a rather reasonable improvement. | ||||
* | | Add precomputed constants for common cases. | Andreas Grois | 2022-10-23 | 8 | -12/+130 |
| | | | | | | | | | | | | 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. | ||||
* | | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-23 | 3 | -6/+7 |
|\| | |||||
| * | Fix benchmark errors. | Andreas Grois | 2022-10-23 | 3 | -6/+7 |
| | | | | | | | | | | 20 bytes worst case was using 16 bytes. 32 bytes full division was producing a leading zero. | ||||
* | | Rename "potency" to "power", the English term. | Andreas Grois | 2022-10-23 | 4 | -51/+51 |
| | | | | | | | | | | It seems English doesn't use the word potency in this context, but rather uses power. | ||||
* | | Precompute power+exponent for iterative conversion | Andreas Grois | 2022-10-23 | 4 | -75/+191 |
| | | | | | | | | | | | | | | | | | | | | | | 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... | ||||
* | | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-22 | 1 | -3/+8 |
|\| | |||||
| * | Pre-Allocate resulting password. | Andreas Grois | 2022-10-22 | 1 | -3/+8 |
| | | | | | | | | It's not perfect, but a much better guess than previously. | ||||
* | | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-22 | 3 | -6/+19 |
|\| | |||||
| * | Increase duration and sample count for benchmarks. | Andreas Grois | 2022-10-22 | 3 | -6/+19 |
| | | |||||
* | | Add more unit tests to iterative_conversion. | Andreas Grois | 2022-10-22 | 1 | -23/+206 |
| | | |||||
* | | Make n-digit division performing. | Andreas Grois | 2022-10-22 | 1 | -24/+18 |
| | | | | | | | | | | | | 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. | ||||
* | | Minor code cleanup. No performance impact. | Andreas Grois | 2022-10-22 | 1 | -28/+37 |
| | | |||||
* | | Code cleanup and addition of unit tests. | Andreas Grois | 2022-10-22 | 1 | -78/+124 |
| | | |||||
* | | Fix trait visibility. | Andreas Grois | 2022-10-21 | 2 | -2/+2 |
| | | |||||
* | | Exponential search for largest potency. | Andreas Grois | 2022-10-21 | 3 | -8/+110 |
| | | | | | | | | | | Speeds up the 20 and 32 byte cases. Has slightly negative impact for 16 byte case. | ||||
* | | Macro for single-digit-division. | Andreas Grois | 2022-10-20 | 1 | -37/+37 |
| | | | | | | | | Just to remove code duplication. | ||||
* | | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-20 | 8 | -205/+332 |
|\| | |||||
| * | Group Benchmarks, and make parameters more sane. | Andreas Grois | 2022-10-20 | 8 | -205/+332 |
| | | | | | | | | | | | | | | | | The previous parameters for benchmarks were based on gut-feeling. Now each hash-length has 3 benchmarks: - Typical is a typical user input - Max Divisions is a full generate_password_part run - Worst Case is the worst user input possible: Base 2. | ||||
* | | Minor: Shift Operation optimization. | Andreas Grois | 2022-10-20 | 1 | -10/+4 |
| | | |||||
* | | Merge branch 'main' into feature/heap-allocation-free-base-conversion | Andreas Grois | 2022-10-19 | 1 | -5/+70 |
|\| | |||||
| * | Make some asserts debug_asserts. Add more benches. | Andreas Grois | 2022-10-19 | 2 | -9/+74 |
| | | | | | | | | | | Now that work on performance has started, accurate readings are important. | ||||
* | | Change normalization of Knuth division to shift. | Andreas Grois | 2022-10-19 | 1 | -6/+38 |
| | | | | | | | | That's a lot faster than division. | ||||
* | | Add many-numbers test for long division. | Andreas Grois | 2022-10-19 | 2 | -6/+69 |
| | | |||||
* | | Draft of iterative_conversion. | Andreas Grois | 2022-10-18 | 7 | -225/+129 |
| | | |||||
* | | First draft of (untested) iterative conversion. | Andreas Grois | 2022-10-18 | 6 | -36/+628 |
| | | |||||
* | | Minor: Add warning that 16bit might not work | Andreas Grois | 2022-10-18 | 1 | -0/+3 |
|/ | |||||
* | Add simple benchmarks. | Andreas Grois | 2022-10-13 | 2 | -1/+143 |
| | | | | As preparation for an eventual rewrite of the base conversion code. | ||||
* | Minor: rename a function | Andreas Grois | 2022-10-12 | 1 | -2/+2 |
| | | | | to better match the names of similar functions. | ||||
* | Add more password generation integration tests. | Andreas Grois | 2022-10-12 | 1 | -0/+251 |
| | | | | | A single test for each generation algorithm, and tests for prefix/suffix handling if there isn't enough space. | ||||
* | Fix Rust 1.52 compat. | Andreas Grois | 2022-10-11 | 1 | -3/+2 |
| | |||||
* | Refactor base_conversion. Fix hmac byte bug. | Andreas Grois | 2022-10-11 | 5 | -85/+208 |
| | | | | | | | 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. | ||||
* | Update Readme with the now final name of PassFish. | Andreas Grois | 2022-10-10 | 1 | -2/+2 |
| | |||||
* | Add first integration test. | Andreas Grois | 2022-10-09 | 2 | -1/+83 |
| | |||||
* | Add License and Readme files. | Andreas Grois | 2022-10-09 | 2 | -0/+178 |
| | |||||
* | First draft of docs. | Andreas Grois | 2022-10-09 | 4 | -87/+103 |
| | |||||
* | Also add url_parsing to this crate. | Andreas Grois | 2022-10-09 | 4 | -67/+711 |
| | |||||
* | Initial Commit: PasswordMaker itself. | Andreas Grois | 2022-10-09 | 9 | -0/+881 |
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. |