3 ms·
A surprising bit twiddling trick[0] uses a De Bruijn sequence to calculate log base 2. [0] https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBru
by jhncls 6y ago
A surprising bit twiddling trick[0] uses a De Bruijn sequence to calculate log base 2.
[0] https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn https://graphics.stanford.edu/~seander/bithacks.html#Integer...