Given a 64 bit integer, where the last 52 bits to be evaluated and the leading 12 bits are to be ignored, what is the fastest way to loop every single combination of 7 bits on and all other bits off?
Example:
First permutation:
0[x57]1111111
Last permutation
00000000000011111110[x45]
Where 0[xn]
means n
off (zero) bits.
Speed is absolutely crucial, we are looking to save every clock cycle we can as it is part of a greater solution that needs to evaluate billions of states in a reasonable amount of time.
A working solution is not required, but some pseudo code would do just fine :)