Hoist prime order thresholds in CPU heuristics

This commit is contained in:
Marek Lemańczyk committed 2025-10-27 21:24:43 +01:00
1 parent 1bd3d5c163
commit 94a4ed8328
12 files changed
+670 -351

No files matched your search

@@ -93,9 +93,15 @@ public static class MersenneNumberDivisorByDivisorTester
}
else
{
while (startIndex > 0 && candidates[startIndex - 1] >= startPrime)
while (startIndex > 0)
{
startIndex--;
int previousIndex = startIndex - 1;
if (candidates[previousIndex] < startPrime)
{
break;
}
startIndex = previousIndex;
}
}
}