rmuir commented on code in PR #13381:
URL: https://github.com/apache/lucene/pull/13381#discussion_r1605828738
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -57,6 +58,7 @@ abstract class MemorySegmentIndexInput extends IndexInput
implements RandomAcces
MemorySegment
curSegment; // redundant for speed: segments[curSegmentIndex], also
marker if closed!
long curPosition; // relative to curSegment, not globally
+ int consecutivePrefetchHitCount;
Review Comment:
you could also make this a single `AtomicInteger` per mapping and try
`incrementAndGet()`. I feel like it is worth the discussion, in a multithreaded
case, any small cost to using this might be drowned in the savings of making
less system calls overall?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]