Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add description for naiveThreshold
  • Loading branch information
key-moon committed Sep 23, 2021
commit eb7be98b9bc1d12297a45ee8da417e384474ea6f
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,13 @@ private static bool HexNumberToBigInteger(ref BigNumberBuffer number, out BigInt
}
}

//
// This threshold is for choosing the algorithm to use based on the number of digits.
//
// Let N be the number of digits. If N is less than or equal to the bound, use a naive
// algorithm with a running time of O(N^2). And if it is greater than the threshold, use
// a divide-and-conquer algorithm with a running time of O(NlogN).
//
private static int s_naiveThreshold = 20000;
private static bool NumberToBigInteger(ref BigNumberBuffer number, out BigInteger result)
{
Expand Down