List<T> compatibility code moved to Recyclable.Collections.Compatibility.List package. Cleanup.

This commit is contained in:
mlemanczyk committed 2023-10-21 17:29:53 +02:00
1 parent ec69b1c406
commit 203b13268f
61 files changed
+1634 -4375

No files matched your search

@@ -1,4 +1,5 @@
using Collections.Pooled;
using Collections.Benchmarks.Core;
namespace Recyclable.Collections.Benchmarks
{
@@ -7,31 +8,31 @@ namespace Recyclable.Collections.Benchmarks
public void Array_Create_WithCapacity()
{
var data = new int[TestObjectCount];
DoNothing(data);
DoNothing.With(data);
}
public void List_Create_WithCapacity()
{
var list = new List<int>(TestObjectCount);
DoNothing(list);
DoNothing.With(list);
}
public void PooledList_Create_WithCapacity()
{
using var list = new PooledList<int>(capacity: TestObjectCount, ClearMode.Auto);
DoNothing(list);
DoNothing.With(list);
}
public void RecyclableList_Create_WithCapacity()
{
using var list = new RecyclableList<int>(TestObjectCount);
DoNothing(list);
DoNothing.With(list);
}
public void RecyclableLongList_Create_WithCapacity()
{
using var list = new RecyclableLongList<int>(minBlockSize: BlockSize, initialCapacity: TestObjectCount);
DoNothing(list);
DoNothing.With(list);
}
}
}