SipHashInline { public static long[] getKey(byte[] key) { if (null == key) { return null; } ByteBuffer bb = ByteBuffer.wrap(key); bb.order(ByteOrder.BIG_ENDIAN); long[] sipkey = new long[2]; sipkey[0] = bb.getLong(); sipkey[1] = bb.getLong(); return sipkey; }  static long hash24(byte[] key, byte[] data, int offset, int len); static long hash24(byte[] key, byte[] data, int offset, int len, boolean reversed); static long hash24(byte[] key, byte[] data); static long hash24(long k0, long k1, byte[] data, int offset, int len); static long hash24(long k0, long k1, byte[] data, int offset, int len, boolean reversed); static long hash24_palindromic(long k0, long k1, byte[] data, int offset, int len); static long hash24_palindromic(byte[] key, byte[] data, int offset, int len); static long hash24_palindromic(long k0, long k1, byte[] data); static long hash24_palindromic(byte[] key, byte[] data); static long[] getKey(byte[] key);  }
@Test public void testGetKey_perf() { byte[] key = new byte[16]; int n = 2000000000; long nano = System.nanoTime(); for (int i = 0; i < n; i++) { long[] sipkey = SipHashInline.getKey(key); } System.out.println((System.nanoTime() - nano) / 1000000.0D); }