Package uno.xifan.id.generator
Class LongToBytesBenchmark
java.lang.Object
uno.xifan.id.generator.LongToBytesBenchmark
- Direct Known Subclasses:
LongToBytesBenchmark_jmhType_B1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]longToBytesByteBuffer(long value) static byte[]longToBytesManual(long value) static byte[]longToBytesUnsafe(long value) static voidvoidtestByteBuffer(org.openjdk.jmh.infra.Blackhole bh) voidtestManual(org.openjdk.jmh.infra.Blackhole bh) voidtestUnsafe(org.openjdk.jmh.infra.Blackhole bh)
-
Constructor Details
-
LongToBytesBenchmark
public LongToBytesBenchmark()
-
-
Method Details
-
longToBytesManual
public static byte[] longToBytesManual(long value) -
longToBytesByteBuffer
public static byte[] longToBytesByteBuffer(long value) -
longToBytesUnsafe
public static byte[] longToBytesUnsafe(long value) -
testManual
public void testManual(org.openjdk.jmh.infra.Blackhole bh) -
testByteBuffer
public void testByteBuffer(org.openjdk.jmh.infra.Blackhole bh) -
testUnsafe
public void testUnsafe(org.openjdk.jmh.infra.Blackhole bh) -
main
- Throws:
org.openjdk.jmh.runner.RunnerException
-