@Test public void testSameNumbersHave64BitsPrefix() { for (long a = 0; a < 120000000; a += 101) { long b = a; assertEquals(64, LongUtil.commonPrefixLength(a, b)); } }
public static final int commonPrefixLength(long a, long b) { int result = 0; while (result < 64 && (a & FIRST_BIT) == (b & FIRST_BIT)) { result++; a <<= 1; b <<= 1; } return result; }
LongUtil { public static final int commonPrefixLength(long a, long b) { int result = 0; while (result < 64 && (a & FIRST_BIT) == (b & FIRST_BIT)) { result++; a <<= 1; b <<= 1; } return result; } }
LongUtil { public static final int commonPrefixLength(long a, long b) { int result = 0; while (result < 64 && (a & FIRST_BIT) == (b & FIRST_BIT)) { result++; a <<= 1; b <<= 1; } return result; }  }
LongUtil { public static final int commonPrefixLength(long a, long b) { int result = 0; while (result < 64 && (a & FIRST_BIT) == (b & FIRST_BIT)) { result++; a <<= 1; b <<= 1; } return result; }  static final int commonPrefixLength(long a, long b); }
LongUtil { public static final int commonPrefixLength(long a, long b) { int result = 0; while (result < 64 && (a & FIRST_BIT) == (b & FIRST_BIT)) { result++; a <<= 1; b <<= 1; } return result; }  static final int commonPrefixLength(long a, long b); static final long FIRST_BIT; }