title: ByteBuffer.allocate() vs. ByteBuffer.allocateDirect()
body: <p>To <code>allocate()</code> or to <code>allocateDirect()</code>, that is the question.</p>
  
  <p>For some years now I've just stuck to the thought that since <code>DirectByteBuffer</code>s are a direct memory mapping at OS level, that it would perform quicker with get/put calls than <code>HeapByteBuffer</code>s. I never was really interested in finding out the exact details regarding the situation until now. I want to know which of the two types of <code>ByteBuffer</code>s are faster and on what conditions.</p>