This does not seem to be a very good test setup since it is highly periodic and gives you only three different long numbers in your internal array. It would be better to have more variance. Maybe use a helper function "getBit(long)" that computes this for you, so you don't have to have the same computation copied in many places.