Tiny performance improvement based on RecyclableList<T> benchmarks.

This commit is contained in:
mlemanczyk committed 2023-07-01 15:44:59 +02:00
1 parent 391c72ee48
commit 823141400a
1 file changed
+1 -1
@@ -238,7 +238,7 @@ namespace Recyclable.Collections
T[] oldMemoryBlock = sourceList._memoryBlock;
// & WAS SLOWER AS ARRAY
Array.Copy(oldMemoryBlock, newMemoryBlock, oldMemoryBlock.Length);
new Span<T>(oldMemoryBlock).CopyTo(newMemoryBlock);
if (oldMemoryBlock.Length >= RecyclableDefaults.MinPooledArrayLength)
{