Benchmark list updated for current runs.
This commit is contained in:
1 parent
cbac777e43
commit
64be78d1c6
3 files changed
+35
-13
No files matched your search
@@ -1,16 +1,38 @@
|
||||
using BenchmarkDotNet.Running;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Running;
|
||||
using Recyclable.Collections.Benchmarks;
|
||||
|
||||
//BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(new[] { "-f*" });
|
||||
|
||||
//BenchmarkRunner.Run<RecyclableCollectionsBenchmarks>();
|
||||
BenchmarkRunner.Run<RecyclableCollectionsBenchmarks>(
|
||||
ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)
|
||||
);
|
||||
|
||||
|
||||
//BenchmarkRunner.Run<RefVsInstanceMemberBenchmarks>();
|
||||
|
||||
var benchmark = new RecyclableCollectionsBenchmarks();
|
||||
benchmark.Setup();
|
||||
//benchmark.RecyclableArrayList_AddRange_WithCapacity();
|
||||
//benchmark.RecyclableArrayList_Add_WithCapacity();
|
||||
benchmark.RecyclableList_Add_WithCapacity();
|
||||
//var benchmark = new RecyclableCollectionsBenchmarks();
|
||||
//benchmark.Setup();
|
||||
//foreach (var _ in Enumerable.Range(1, 1000))
|
||||
//{
|
||||
// //benchmark.RecyclableArrayList_AddRange_WithCapacity();
|
||||
// //benchmark.RecyclableArrayList_Add_WithCapacity();
|
||||
|
||||
// //benchmark.RecyclableList_Create();
|
||||
// benchmark.RecyclableList_Create_WithCapacity();
|
||||
// //benchmark.RecyclableList_Add();
|
||||
// //benchmark.RecyclableList_Add_WithCapacity();
|
||||
//}
|
||||
|
||||
//benchmark.Cleanup();
|
||||
|
||||
// benchmark.Setup();
|
||||
// benchmark.Cleanup();
|
||||
|
||||
//benchmark.Setup();
|
||||
//benchmark.Cleanup();
|
||||
|
||||
//}
|
||||
|
||||
|
||||
//BenchmarkRunner.Run<DelegateVsComparerBenchmark>();
|
||||
|
||||
+4
-4
@@ -4,21 +4,21 @@ namespace Recyclable.Collections.Benchmarks
|
||||
{
|
||||
public partial class RecyclableCollectionsBenchmarks : BenchmarkBase
|
||||
{
|
||||
[Benchmark]
|
||||
//[Benchmark]
|
||||
public void RecyclableArrayList_Create()
|
||||
{
|
||||
using var list = new RecyclableArrayList<object>();
|
||||
DoNothing(list);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
//[Benchmark]
|
||||
public void RecyclableArrayList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new RecyclableArrayList<object>(TestObjectCount);
|
||||
DoNothing(list);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
//[Benchmark]
|
||||
public void RecyclableArrayList_Add()
|
||||
{
|
||||
var data = TestObjects;
|
||||
@@ -30,7 +30,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
}
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
//[Benchmark]
|
||||
public void RecyclableArrayList_Add_WithCapacity()
|
||||
{
|
||||
var data = TestObjects;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
[Benchmark]
|
||||
public void RecyclableList_Create_WithCapacity()
|
||||
{
|
||||
using var list = new RecyclableList<object>(initialCapacity: TestObjectCount);
|
||||
using var list = new RecyclableList<object>(blockSize: 102_400, initialCapacity: TestObjectCount);
|
||||
DoNothing(list);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Recyclable.Collections.Benchmarks
|
||||
{
|
||||
var data = TestObjects;
|
||||
var dataCount = TestObjectCount;
|
||||
using var list = new RecyclableList<object>(initialCapacity: dataCount);
|
||||
using var list = new RecyclableList<object>(blockSize: 102_400, initialCapacity: dataCount);
|
||||
for (var i = 0; i < dataCount; i++)
|
||||
{
|
||||
list.Add(data[i]);
|
||||
|
||||
Reference in new issue
Block a user