Speed up ByteBuffer parsing
This is relatively slow for some reason. Figure out why!
@non A reason why ByteBuffer in JVM is slow is it generates TypeProfile https://wiki.openjdk.java.net/display/HotSpot/TypeProfile to resolve a single method from many ByteBuffer sub classes in Java standard libraries. So each ByteBuffer.get(i) call will look up the TypeProfile table and become slower than Array[Byte] lookup.
A workaround is extracting the internal buffer (array or off-heap) of ByteBuffer like this implementation: https://github.com/msgpack/msgpack-java/blob/develop/msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java
However this kind of implementation needs sun.misc.Unsafe and introduce some complexities to your code.