RecyclableList.Contains reworked - first version

This commit is contained in:
mlemanczyk committed 2023-02-01 23:29:23 +01:00
1 parent f3381942bc
commit 91abf1a614
4 files changed
+154 -32

No files matched your search

+29 -17
View File
@@ -4,28 +4,40 @@ using Recyclable.Collections.Benchmarks;
//BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(new[] { "-f*" });
BenchmarkRunner.Run<RecyclableCollectionsBenchmarks>(
ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)
);
//BenchmarkRunner.Run<RefVsInstanceMemberBenchmarks>();
//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();
internal class Program
{
void RunBenchmark()
{
var benchmark = new RecyclableCollectionsBenchmarks();
benchmark.Setup();
foreach (var _ in Enumerable.Range(1, 1000))
{
benchmark.RecyclableList_Contains();
//benchmark.RecyclableArrayList_AddRange_WithCapacity();
//benchmark.RecyclableArrayList_Add_WithCapacity();
//benchmark.RecyclableList_Create();
//benchmark.RecyclableList_Create_WithCapacity();
//benchmark.RecyclableList_Add();
//benchmark.RecyclableList_Add_WithCapacity();
}
benchmark.Cleanup();
}
private static void Main(string[] args)
{
BenchmarkRunner.Run<RecyclableCollectionsBenchmarks>(
ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator | ConfigOptions.JoinSummary)
);
//RunBenchmark();
}
}
// benchmark.Setup();
// benchmark.Cleanup();