You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Description>HdrHistogram supports low latency recording and analyzing of sampled data value counts across a configurable integer value range with configurable value precision within the range.</Description>
/// Imperative implementation of the LeadingZeroCount, when access to the <c>System.Numerics.BitOperations.LeadingZeroCount(ulong)</c> is not available.
54
-
/// </summary>
55
-
publicstaticclassImperative
56
-
{
57
-
privatestaticreadonlyint[]Lookup;
58
-
59
-
staticImperative()
60
-
{
61
-
Lookup=newint[256];
62
-
for(inti=1;i<256;++i)
63
-
{
64
-
Lookup[i]=(int)(Math.Log(i)/Math.Log(2));
65
-
}
66
-
}
67
-
68
-
/// <summary>
69
-
/// Returns the Leading Zero Count (lzc) of the <paramref name="value"/> for its binary representation.
70
-
/// </summary>
71
-
/// <param name="value">The value to find the number of leading zeros</param>
72
-
/// <returns>The number of leading zeros.</returns>
73
-
publicstaticintNumberOfLeadingZeros(longvalue)
74
-
{
75
-
//Optimisation for 32 bit values. So values under 00:16:41.0 when measuring with Stopwatch.GetTimestamp()*, we will hit a fast path.
0 commit comments