Test data item type changed to "long" for performance reasons.
This commit is contained in:
1 parent
abfe476573
commit
c45af6a884
20 files changed
+97
-99
No files matched your search
@@ -8,35 +8,35 @@ namespace Recyclable.Collections.Benchmarks
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void Array_Create_WithCapacity()
|
||||
{
|
||||
var data = new object[TestObjectCount];
|
||||
var data = new long[TestObjectCount];
|
||||
DoNothing(data);
|
||||
}
|
||||
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void List_Create_WithCapacity()
|
||||
{
|
||||
var list = new List<object>(checked((int)TestObjectCount));
|
||||
var list = new List<long>(TestObjectCount);
|
||||
DoNothing(list);
|
||||
}
|
||||
|
||||
//[Benchmark(Baseline = true)]
|
||||
public void PooledList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new PooledList<object>(capacity: checked((int)TestObjectCount), ClearMode.Always);
|
||||
using var list = new PooledList<long>(capacity: TestObjectCount, ClearMode.Auto);
|
||||
DoNothing(list);
|
||||
}
|
||||
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void RecyclableArrayList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new RecyclableArrayList<object>(checked((int)TestObjectCount));
|
||||
using var list = new RecyclableArrayList<long>(TestObjectCount);
|
||||
DoNothing(list);
|
||||
}
|
||||
|
||||
//[Benchmark(Baseline = false)]
|
||||
public void RecyclableList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new RecyclableList<object>(minBlockSize: BlockSize, expectedItemsCount: TestObjectCount);
|
||||
using var list = new RecyclableList<long>(minBlockSize: BlockSize, expectedItemsCount: TestObjectCount);
|
||||
DoNothing(list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user