This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of BigInteger.Pow/ModPow
- To introduce further performance tweaks, the exponentiation algorithms are rewritten and ported to `BigIntegerCalculator`. - To scale better for bigger numbers a `FastReducer` is in use instead of "ordinary" modulo operations, which is based on multiplications. - Furthermore the newly introduced `FastReducer` triggers a bad corner case within the division algorithm, which gets fixed too. - A performance regression at 64 bits within integer division was found, which gets fixed too (no more allocations within that code). - The test code for threshold values of square / multiply / modpow now modifies these thresholds for more thorough testing.
- Loading branch information
Showing
11 changed files
with
987 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.