Restore pooled small factor buffers

This commit is contained in:
Marek Lemańczyk committed 2025-10-16 17:18:19 +02:00
1 parent 949b5f891c
commit fb08a61c66
2 files changed
+49 -26

No files matched your search

+12
View File
@@ -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;