Lzct SSE instruction when available
LeeCampbell opened this issue · comments
We currently have at the heart of the hot path a manual method for find the leading zero count.
This is used to identify the correct bucket to assign a recorded value.
Frustratingly, this is supported as an intrinsic instruction on most modern CPU architectures.
The code is found in Bitwise.NumberOfLeadingZeros
, and has been isolated with the intent that it can be a single place to refactor/optimize if the opportunity arises.
Follow this .NET core issue for progress/resolution https://github.com/dotnet/corefx/issues/2209
Moved to HdrHistogram/HdrHistogram.NET#42