Requeue timed-out Pollard Rho composites
This commit is contained in:
1 parent
43e2894661
commit
e4f6cbbe25
1 file changed
+8
-7
@@ -855,13 +855,6 @@ internal static partial class PrimeOrderCalculator
|
|||||||
{
|
{
|
||||||
while (compositeStack.Count > 0)
|
while (compositeStack.Count > 0)
|
||||||
{
|
{
|
||||||
long currentTimestamp = Stopwatch.GetTimestamp();
|
|
||||||
if (currentTimestamp > deadlineTimestamp)
|
|
||||||
{
|
|
||||||
pollardRhoDeadlineReached = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ulong composite = compositeStack.Pop();
|
ulong composite = compositeStack.Pop();
|
||||||
// composite will never be smaller than 1 on the execution path
|
// composite will never be smaller than 1 on the execution path
|
||||||
// if (composite <= 1UL)
|
// if (composite <= 1UL)
|
||||||
@@ -877,6 +870,14 @@ internal static partial class PrimeOrderCalculator
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long currentTimestamp = Stopwatch.GetTimestamp();
|
||||||
|
if (currentTimestamp > deadlineTimestamp)
|
||||||
|
{
|
||||||
|
pollardRhoDeadlineReached = true;
|
||||||
|
pending.Add(new PendingEntry(composite, knownComposite: true));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!TryPollardRho(composite, deadlineTimestamp, out ulong factor))
|
if (!TryPollardRho(composite, deadlineTimestamp, out ulong factor))
|
||||||
{
|
{
|
||||||
pending.Add(new PendingEntry(composite, knownComposite: true));
|
pending.Add(new PendingEntry(composite, knownComposite: true));
|
||||||
|
|||||||
Reference in new issue
Block a user