Small performance improvement to benefit from .Net optimization for faster calls.
This commit is contained in:
1 parent
3f11b3b384
commit
5ee70abf93
1 file changed
+2
-3
@@ -433,9 +433,8 @@ namespace Recyclable.Collections
|
|||||||
|
|
||||||
if (oldCount > 0)
|
if (oldCount > 0)
|
||||||
{
|
{
|
||||||
var sourceSpan = new Span<T>(_memoryBlock, index, oldCount);
|
new Span<T>(_memoryBlock, index, oldCount)
|
||||||
var targetSpan = new Span<T>(_memoryBlock, index + 1, oldCount);
|
.CopyTo(new Span<T>(_memoryBlock, index + 1, oldCount));
|
||||||
sourceSpan.CopyTo(targetSpan);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_memoryBlock[index] = item;
|
_memoryBlock[index] = item;
|
||||||
|
|||||||
Reference in new issue
Block a user