
H.J. Lu has committed an FMA-optimized log2() function to the GNU C Library for obtaining the base 2 logarithm of a value.
Using an older Intel Skylake CPU for reference, his Fused Multiply Add (FMA) optimized log2 function was 34% faster or up to 69% faster for maximum performance.
It's yet another nice hand-tuned function for the GNU C Library that's now in Glibc Git .