From e5c20a1aaa273f57af239b1218d4f62ad82aa4b4 Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sat, 1 Jul 2023 13:54:44 +0200 Subject: [PATCH] TODOs added --- Recyclable.Collections/RecyclableLongList.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Recyclable.Collections/RecyclableLongList.cs b/Recyclable.Collections/RecyclableLongList.cs index 7681caa..3fd5493 100644 --- a/Recyclable.Collections/RecyclableLongList.cs +++ b/Recyclable.Collections/RecyclableLongList.cs @@ -1034,6 +1034,7 @@ namespace Recyclable.Collections } } + // TODO: Do we want to initialize with empty arrays or null refs? Null refs may be faster. Array.Fill(_memoryBlocks, _emptyBlockArray, 0, _reservedBlockCount); _capacity = 0; _reservedBlockCount = 0; @@ -1178,6 +1179,7 @@ namespace Recyclable.Collections if (NeedsClearing) { + // TODO: Can we benefit from Span here? _memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default; } @@ -1246,6 +1248,7 @@ namespace Recyclable.Collections if (NeedsClearing) { + // TODO: Can we benefit from Span here? _memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default; } @@ -1284,6 +1287,7 @@ namespace Recyclable.Collections if (NeedsClearing) { + // TODO: Can we benefit from Span here? _memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default; }