Benchmarks added & reorganized.
This commit is contained in:
1 parent
ccf5c61dd0
commit
a216c028a0
48 files changed
+13483
-363
No files matched your search
@@ -0,0 +1,38 @@
|
||||
using Collections.Pooled;
|
||||
using Collections.Benchmarks.Core;
|
||||
|
||||
namespace Recyclable.Collections.Benchmarks
|
||||
{
|
||||
public partial class RecyclableCollectionsBenchmarks
|
||||
{
|
||||
public void Array_Create_WithCapacity()
|
||||
{
|
||||
var data = new int[TestObjectCount];
|
||||
DoNothing.With(data);
|
||||
}
|
||||
|
||||
public void List_Create_WithCapacity()
|
||||
{
|
||||
var list = new List<int>(TestObjectCount);
|
||||
DoNothing.With(list);
|
||||
}
|
||||
|
||||
public void PooledList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new PooledList<int>(capacity: TestObjectCount, ClearMode.Auto);
|
||||
DoNothing.With(list);
|
||||
}
|
||||
|
||||
public void RecyclableList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new RecyclableList<int>(TestObjectCount);
|
||||
DoNothing.With(list);
|
||||
}
|
||||
|
||||
public void RecyclableLongList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new RecyclableLongList<int>(minBlockSize: BlockSize, initialCapacity: TestObjectCount);
|
||||
DoNothing.With(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user