bitwise and math speed tweeks