[
https://issues.apache.org/jira/browse/LUCENE-8386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16535991#comment-16535991
]
David Smiley commented on LUCENE-8386:
--------------------------------------
First a disclaimer: I was merely looking at the code; this wasn't driven by any
debugging session or profiling.
bq. I see BitSetIterator as an exception, other Bits-based iterators don't
perform well
I'm confused. Why would BitSetIterator _specifically_ be better than some
other hypothetical Bits-based iterator? A hypothetical Bits-based iterator of
course would be based on some fast bit set, though through API reasons isn't
necessarily a BitSetIterator specifically.
bq. Bits-based iterators don't perform well and are better implemented with
two-phase iterators
That surprises me; I would imagine it would depend on the cardinality of the
bits since a low-cardinality bit set ought to potentially lead iteration? For
an extremely dense case; I'm not sure how much it'd matter either way since
they are cheap to work with.
> Maybe a DocIdSetIterator may implement Bits?
> --------------------------------------------
>
> Key: LUCENE-8386
> URL: https://issues.apache.org/jira/browse/LUCENE-8386
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/search
> Reporter: David Smiley
> Priority: Minor
>
> I was looking at ConjunctionDISI and noted the special case logic for DISI's
> of type BitSetIterator. It seems to only need the more minimal Bits interface
> though it makes references to BitSet specifically. BitSetIterator is a
> concrete class; it would be nice if a DISI could either implement an optional
> interface to expose a Bits or perhaps implements Bits directly. This would
> allow other/custom DISIs that can implement a Bits quickly without being
> forced to use BitSetIterator specifically. Even DocIdSetIterator.all(...)
> could implement this.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]