BlockSizePow2BitShift added to PocBenchmarkBase for simpler reuse.
This commit is contained in:
1 parent
ef670dbf2d
commit
33b4837411
1 file changed
+3
@@ -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<T>(in T item)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user