When I asked a question, that states what is the fastest way to find the powers of 2, I get the answer "precompute them and use a lookup table".
How can I pre-compute a table of powers of 2 using templates?
Link to my previous question: Better way to find the powers of 2
Here's an idea: