4 ms·
Here I thought this was going to be something like finding the next power of two[1]. Like a few other posters have mentioned, this is all basic bit manipulatio
by vvanders 8y ago
Here I thought this was going to be something like finding the next power of two[1].
Like a few other posters have mentioned, this is all basic bit manipulation stuff that you'd see in any perf sensitive/memory constrained codebase.
[1] https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 https://graphics.stanford.edu/~seander/bithacks.html#RoundUp...