pub fn highest_bit_set(n: u32) -> u32Expand description
bithacks functions. Implmented according to paper “Faster Remainder by Direct Computation Applications to Compilers and Software Libraries” Given a 32-bit number, find the highest bit number which is set 1. e.g:
for 0011(3), returns 1.
for 0100(4), returns 2.