Stop clearing pooled buffers inside rent helpers
This commit is contained in:
1 parent
7baf3b619f
commit
a226ae10cb
3 files changed
+9
-26
No files matched your search
@@ -322,6 +322,7 @@ public class MersenneDivisorCycles
|
||||
primeOrderFailed = false;
|
||||
}
|
||||
|
||||
factorCounts.Clear();
|
||||
ThreadStaticPools.ReturnFactorCountDictionary(factorCounts);
|
||||
return success;
|
||||
}
|
||||
@@ -339,6 +340,7 @@ public class MersenneDivisorCycles
|
||||
bool success = TryFactorIntoCountsInternal(value, scratch);
|
||||
if (!success)
|
||||
{
|
||||
scratch.Clear();
|
||||
ThreadStaticPools.ReturnFactorScratchDictionary(scratch);
|
||||
return false;
|
||||
}
|
||||
@@ -349,6 +351,7 @@ public class MersenneDivisorCycles
|
||||
AddFactor(counts, pair.Key, pair.Value);
|
||||
}
|
||||
|
||||
scratch.Clear();
|
||||
ThreadStaticPools.ReturnFactorScratchDictionary(scratch);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user