Improve memory use of the array to find the position of a bit value