C# Class HdrHistogram.Benchmarking.LeadingZeroCount.LeadingZeroCountBenchmarkBase

This is the base class for Leading Zero Count benchmarks.
This class is used so that we can test both 32bit and 64bit values. As most values that will be recorded will likely be for values in the 32 bit range, and recording in this space will be most sensitive to latency, we want to be able to benchmark each range of values. The LeadingZeroCount algorithm is one of the hot spots in the HdrHistogram code base. This is why we are micro-benchmarking it. Leading Zero Count (lzc or lzcnt) is also known as Count Leading Zeros (clz) and has numerous similar or closely related algorithms : * Most Significant Bit (MSB), * Find First Set (FFS), * BitScan Forward, * Hamming Weight * DeBruijn
ファイルを表示 Open project: HdrHistogram/HdrHistogram.NET

Protected Methods

Method Description
LeadingZeroCountBenchmarkBase ( int maxBit ) : System

Private Methods

Method Description
CurrentImplementation ( ) : int
DeBruijn64BitsBitScanner ( ) : int
DeBruijnMultiplication ( ) : int
Debruijn128Bit ( ) : int
Debruijn64Bit ( ) : int
GenerateTestData ( int maxBit ) : CalculationExpectation[]
IfAndShift ( ) : int
StringManipulation ( ) : int
ValidateImplementations ( IEnumerable expectedData, int>.Dictionary functions ) : void

Method Details

LeadingZeroCountBenchmarkBase() protected method

protected LeadingZeroCountBenchmarkBase ( int maxBit ) : System
maxBit int
return System