richardstartin commented on a change in pull request #7708: URL: https://github.com/apache/pinot/pull/7708#discussion_r743988780
########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/FixedByteValueReaderWriter.java ########## @@ -56,14 +57,28 @@ public String getUnpaddedString(int index, int numBytesPerValue, byte paddingByt assert buffer.length >= numBytesPerValue; long startOffset = (long) index * numBytesPerValue; - for (int i = 0; i < numBytesPerValue; i++) { - byte currentByte = _dataBuffer.getByte(startOffset + i); - if (currentByte == paddingByte) { - return new String(buffer, 0, i, UTF_8); + int written = 0; + long pattern = (paddingByte & 0xFFL) * 0x101010101010101L; + ByteBuffer wrapper = ByteBuffer.wrap(buffer); + for (int i = 0; i < ((numBytesPerValue >>> 3) << 3); i += 8) { Review comment: yes, it doesn't recalculate it for each loop iteration because it doesn't depend on the loop body -- 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. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org