uschindler commented on code in PR #12600:
URL: https://github.com/apache/lucene/pull/12600#discussion_r1345489213


##########
lucene/core/src/java19/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -168,6 +168,28 @@ private void readBytesBoundary(byte[] b, int offset, int 
len) throws IOException
     }
   }
 
+  private void readBytesBoundary(long pos, byte[] b, int offset, int len) 
throws IOException {

Review Comment:
   You removed the absolute/randomaccess readBytesBoundary method, correct?
   
   I think for the random access case it is fine. The sequential read case is 
more optimized and it uses "catch exception program flow", which is there for 
performance. The separate method is also there for Hotspot to not fall into 
method-bytecode-size limitations while inlining (because readBytesBoundary is 
called exceptionally and should not increate methodSize of readBytes).



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to