You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/06/25 15:59:35 UTC

[GitHub] [incubator-pinot] mayankshriv commented on a change in pull request #4362: Optimize MutableOffHeapByteArrayStore by directly calling the PinotDataBuffer API

mayankshriv commented on a change in pull request #4362: Optimize MutableOffHeapByteArrayStore by directly calling the PinotDataBuffer API
URL: https://github.com/apache/incubator-pinot/pull/4362#discussion_r297266649
 
 

 ##########
 File path: pinot-core/src/main/java/org/apache/pinot/core/io/writer/impl/MutableOffHeapByteArrayStore.java
 ##########
 @@ -113,41 +106,41 @@ private int add(byte[] value) {
         // full
         return -1;
       }
-      for (int i = 0, j = startOffset; i < value.length; i++, j++) {
-        _byteBuffer.put(j, value[i]);
-      }
-      _byteBuffer.putInt(_numValues * Integer.BYTES, startOffset);
+      _pinotDataBuffer.readFrom(startOffset, value);
 
 Review comment:
   I take it that this is the batch read being referred to? Probably I am missing something, but it seemed that the underlying implementations were still iterating over individual bytes. If so, where is the speedup coming from?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org