Hello everyone, this is my first post here. I am currently working to improve the speed of an algorithm. This is just for fun, and I am not concerned with useability. I am just trying to get pure speed.
Currently I am using an array of 64 ints to denote a board. The ints will be 1 if the space is un visited and a 1 if the space has been visited. I would like to remove the iteration required to check if the board is "complete". Currently, I loop through the board looking for a 1. Is there a way I can establish a single variable as just bits:
1)The value of the variable would start as 111111111111111 (64 times)
2)To change the value of a single space, I would start at the memory address, shift n number of spaces and change the value. For example, to change the 4th space, I would shift and result in 111101111111...
3)To check for complete, I just see if the variable is 0. Any single 1 in the number will result in a false.
I am sure this is doable, I am just not sure how (or even if it is efficient)