Improve by-divisor residue reuse and fix Montgomery mul
This commit is contained in:
1 parent
82a0fb1dd7
commit
df69dcbadb
3 files changed
+190
-97
No files matched your search
@@ -813,7 +813,16 @@ internal static class Program
|
||||
return;
|
||||
}
|
||||
|
||||
states.Sort((left, right) => left.AllowedMax.CompareTo(right.AllowedMax));
|
||||
states.Sort(static (left, right) =>
|
||||
{
|
||||
int compare = left.AllowedMax.CompareTo(right.AllowedMax);
|
||||
if (compare != 0)
|
||||
{
|
||||
return compare;
|
||||
}
|
||||
|
||||
return left.Prime.CompareTo(right.Prime);
|
||||
});
|
||||
|
||||
int stateCount = states.Count;
|
||||
ulong[] primeValues = new ulong[stateCount];
|
||||
|
||||
Reference in new issue
Block a user