Align divisor pooling with review feedback

This commit is contained in:
Marek Lemańczyk committed 2025-10-15 19:32:45 +02:00
1 parent e44662413a
commit c8f8132db7
3 files changed
+20 -48

No files matched your search

@@ -112,7 +112,7 @@ public sealed class MersenneNumberDivisorByDivisorCpuTester : IMersenneNumberDiv
Dictionary<ulong, MersenneDivisorCycles.FactorCacheEntry>? current = cache;
if (current is null)
{
current = ThreadStaticPools.TakeMersenneFactorCacheDictionary();
current = ThreadStaticPools.RentMersenneFactorCacheDictionary();
cache = current;
}
@@ -149,11 +149,6 @@ public sealed class MersenneNumberDivisorByDivisorCpuTester : IMersenneNumberDiv
// }
UInt128 step = (UInt128)prime << 1;
if (step == UInt128.Zero)
{
processedAll = true;
return false;
}
UInt128 limit = allowedMax;
UInt128 divisor = step + UInt128.One;