uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1854866407

   > I agree with you, the getInt() seems more expensive than `MemorySegment`, 
i prefer to revert the change on `ByteBufferIndexInput`, then do the similar 
improve on java20, java19 (to keep the 3 impls aligned to each other), what do 
you think?
   > 
   > > for direct buffers (this is what MMap and NIO use
   > 
   > `NIOFSDirectory` seems using `HeapByteBuffer`? the 
`BufferedIndexInput.refill()->ByteBuffer.allocate()` will return a 
`HeapByteBuffer`.
   
   I thought NIO works on the native bytebuffers used internally by NIOFSDir. 
As there is file access involved for optimal performance they should be direct. 
I can check this tomorrow, but I think there was some override in NioFsDir.
   
   Sorry it is too late, but I am quite sure this is the main difference.


-- 
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