Benchmark performance improvements - pattern for all test cases prepared.

This commit is contained in:
mlemanczyk committed 2023-05-03 15:19:56 +02:00
1 parent 98cac9a563
commit 73d3e32107
4 files changed
+70 -35

No files matched your search

@@ -27,8 +27,8 @@ namespace Recyclable.Collections.Benchmarks.POC
public int BlockSize => TestObjectCount switch
{
0 => 1,
> 0 and <= 10 => (int)TestObjectCount,
_ => TestObjectCount / Divider > 0 ? checked((int)(TestObjectCount / Divider)) : checked((int)TestObjectCount)
> 0 and <= 10 => TestObjectCount,
_ => TestObjectCount / Divider > 0 ? TestObjectCount / Divider : TestObjectCount
};
public byte BlockSizePow2BitShift => checked((byte)(31 - BitOperations.LeadingZeroCount((uint)BlockSize)));