diff --git a/Recyclable.Collections.Benchmarks/POC/PocBenchmarkBase.cs b/Recyclable.Collections.Benchmarks/POC/PocBenchmarkBase.cs index e310976..689c121 100644 --- a/Recyclable.Collections.Benchmarks/POC/PocBenchmarkBase.cs +++ b/Recyclable.Collections.Benchmarks/POC/PocBenchmarkBase.cs @@ -1,4 +1,5 @@ using BenchmarkDotNet.Attributes; +using System.Numerics; using System.Runtime.CompilerServices; namespace Recyclable.Collections.Benchmarks.POC @@ -30,6 +31,8 @@ namespace Recyclable.Collections.Benchmarks.POC _ => TestObjectCount / Divider > 0 ? checked((int)(TestObjectCount / Divider)) : checked((int)TestObjectCount) }; + public byte BlockSizePow2BitShift => checked((byte)(31 - BitOperations.LeadingZeroCount((uint)BlockSize))); + [MethodImpl(MethodImplOptions.NoInlining)] protected static void DoNothing(in T item) {