Merge branch 'recyclable-block-list-added'

This commit is contained in:
mlemanczyk committed 2023-06-10 15:56:55 +02:00
commit 7ddbcd1c6e
3 files changed
+6 -25

No files matched your search

@@ -41,10 +41,10 @@ namespace Recyclable.Collections.Benchmarks.POC
// [Params(192, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144)] // [Params(192, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144)]
// [Params(524_288, 786_432, 1_048_576)] // [Params(524_288, 786_432, 1_048_576)]
// [Params(262_144, 393_216, 524_288)] // [Params(262_144, 393_216, 524_288)]
[Params(850_000)] //[Params(850_000)]
// [Params(RecyclableDefaults.MaxPooledBlockSize)] // [Params(RecyclableDefaults.MaxPooledBlockSize)]
// [Params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 32, 40, 50, 60, 80, 90, 100, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 10_000_000, 33_554_432, 50_000_000, 100_000_000)] // [Params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 32, 40, 50, 60, 80, 90, 100, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 10_000_000, 33_554_432, 50_000_000, 100_000_000)]
//[Params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 32, 40, 50, 60, 80, 90, 100, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, RecyclableDefaults.MinItemsCountForParallelization - 1)] [Params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 32, 40, 50, 60, 80, 90, 100, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072)]
//[Params(RecyclableDefaults.MinItemsCountForParallelization, 1_048_576, 2_097_152, 4_194_304, 8_388_608, 16_777_216, 33_554_432, RecyclableDefaults.MaxPooledBlockSize)] //[Params(RecyclableDefaults.MinItemsCountForParallelization, 1_048_576, 2_097_152, 4_194_304, 8_388_608, 16_777_216, 33_554_432, RecyclableDefaults.MaxPooledBlockSize)]
// [Params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 32, 40, 50, 60, 80, 90, 100, 128)] // [Params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 32, 40, 50, 60, 80, 90, 100, 128)]
// [Params(RecyclableDefaults.MinItemsCountForParallelization * 3)] // [Params(RecyclableDefaults.MinItemsCountForParallelization * 3)]
+3 -23
View File
@@ -3,9 +3,10 @@ using BenchmarkDotNet.Running;
using Recyclable.Collections.Benchmarks; using Recyclable.Collections.Benchmarks;
using Recyclable.Collections.Benchmarks.POC; using Recyclable.Collections.Benchmarks.POC;
public class Program public static class Program
{ {
static IConfig BenchmarkConfig { get; } = ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator | ConfigOptions.JoinSummary); static IConfig BenchmarkConfig { get; } = ManualConfig.Create(DefaultConfig.Instance)
.WithOptions(ConfigOptions.DisableOptimizationsValidator | ConfigOptions.JoinSummary | ConfigOptions.KeepBenchmarkFiles);
static void RunAssemblyBenchmarks() static void RunAssemblyBenchmarks()
{ {
@@ -25,26 +26,6 @@ public class Program
//var benchmark = new RecyclableCollectionsBenchmarks(); //var benchmark = new RecyclableCollectionsBenchmarks();
//benchmark.Setup(); //benchmark.Setup();
static void RunAssemblyBenchmarks()
{
_ = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(new[] { "-f*" });
}
static void RunRecyclableCollectionsBenchmarks()
{
_ = BenchmarkRunner.Run<RecyclableCollectionsBenchmarks>(BenchmarkConfig);
}
static void RunSelectedBenchmarks()
{
// ****************
// *** Template ***
// ****************
var benchmark = new RecyclableCollectionsBenchmarks();
benchmark.Setup();
benchmark.RecyclableLongList_IndexOf_BestAndWorstCases();
benchmark.Cleanup();
//foreach (var _ in Enumerable.Range(1, 1000)) //foreach (var _ in Enumerable.Range(1, 1000))
//{ //{
// benchmark.RecyclableLongList_Remove_FirstItems(); // benchmark.RecyclableLongList_Remove_FirstItems();
@@ -76,5 +57,4 @@ public class Program
// RunSelectedBenchmarks(); // RunSelectedBenchmarks();
// RunAssemblyBenchmarks(); // RunAssemblyBenchmarks();
} }
}
} }
@@ -7,6 +7,7 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<StartupObject>Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>