4 ms·
The bit twiddling in this looks fairly naive/slow. There's some really great, fantastically fast methods in https://graphics.stanford.edu/~seander/bithacks.htm
by brian-armstrong 9y ago
The bit twiddling in this looks fairly naive/slow.
There's some really great, fantastically fast methods in https://graphics.stanford.edu/~seander/bithacks.html https://graphics.stanford.edu/~seander/bithacks.html that require some interesting insights in finite fields. These are usually the sorts of techniques you'd want to turn to for bit twiddles