parkertimmins commented on code in PR #16450:
URL: https://github.com/apache/lucene/pull/16450#discussion_r3716327924
##########
lucene/core/src/java/org/apache/lucene/search/DocValuesRangeIterator.java:
##########
@@ -360,12 +360,10 @@ public final void intoBitSet(int upTo, FixedBitSet
bitSet, int offset) throws IO
abstract void intoMaybeBlock(int blockStart, int blockEnd, FixedBitSet
bitSet, int offset)
throws IOException;
- // For MAYBE blocks docIDRunEnd() is conservative (doc+1), so use the full
block boundary to
- // evaluate/classify the whole block at once.
- private int blockEnd(int upTo, SkipBlockRangeIterator.Match match) throws
IOException {
- return match == SkipBlockRangeIterator.Match.MAYBE
- ? Math.min(upTo, blockIterator.blockEnd())
- : Math.min(upTo, blockIterator.docIDRunEnd());
+ // For MAYBE/YES_IF_PRESENT blocks this is the block boundary; for YES
blocks it may extend
+ // further via multi-level run expansion.
+ private int blockEnd(int upTo) throws IOException {
+ return Math.min(upTo, blockIterator.docIDRunEnd());
Review Comment:
Thanks! I might be missing it, but I don't think it will help with SIMD for
the YES_IF_PRESENT case. If I understand correctly, SIMD only gets invoked in
the `rangeIntoBitSet` call, which is in turn called by `intoMaybeBlock`? But I
do think it will make longer runs which will make the MAYBE calls to
`rangeIntoBitSet` more effective. (Since `SkipBlockRangeIterator.docIDRunEnd`
now returns the blockEnd, rather than docID+1, for both MAYBE and
YES_IF_PRESENT.)
--
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]