Restore pooled small factor buffers
This commit is contained in:
1 parent
949b5f891c
commit
fb08a61c66
2 files changed
+49
-26
No files matched your search
@@ -79,6 +79,18 @@ namespace PerfectNumbers.Core
|
||||
}
|
||||
}
|
||||
|
||||
[ThreadStatic]
|
||||
private static ArrayPool<int>? _intPool;
|
||||
|
||||
public static ArrayPool<int> IntPool
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
return _intPool ??= ArrayPool<int>.Create();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[ThreadStatic]
|
||||
private static List<List<ulong>>? _ulongListPool;
|
||||
|
||||
Reference in new issue
Block a user