Tiny performance improvements. Property replaced with field.
This commit is contained in:
1 parent
ceffb90936
commit
17703618d4
1 file changed
+3
-3
@@ -295,19 +295,19 @@ namespace Recyclable.Collections
|
||||
|
||||
for (blockIndex = 0; blockIndex <= lastBlockIndex; blockIndex++)
|
||||
{
|
||||
itemsSpan = new(items.AsArray[blockIndex], 0, sourceBlockSize);
|
||||
itemsSpan = new(items._memoryBlocks[blockIndex], 0, sourceBlockSize);
|
||||
itemsSpan.CopyTo(targetSpan);
|
||||
targetSpan = targetSpan[sourceBlockSize..];
|
||||
}
|
||||
|
||||
if (blockIndex == 0)
|
||||
{
|
||||
itemsSpan = new(items.AsArray[blockIndex], 0, (int)sourceItemsCount);
|
||||
itemsSpan = new(items._memoryBlocks[blockIndex], 0, (int)sourceItemsCount);
|
||||
itemsSpan.CopyTo(targetSpan);
|
||||
}
|
||||
else if (blockIndex <= items.LastBlockWithData)
|
||||
{
|
||||
itemsSpan = new(items.AsArray[blockIndex], 0, items.NextItemIndex);
|
||||
itemsSpan = new(items._memoryBlocks[blockIndex], 0, items.NextItemIndex);
|
||||
itemsSpan.CopyTo(targetSpan);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user