jpountz opened a new issue, #14887:
URL: https://github.com/apache/lucene/issues/14887

   ### Description
   
   `DocIdSetIterator#docID` is always a simple getter, but because we allow 
many different implementations, it almost always requires a virtual call in 
practice, which makes it not so cheap.
   
   We could instead have a protected `DocIdSetIterator#docID` field, make 
`DocIdSetIterator#docID()` return it, and update the contract of `nextDoc()` 
and `advance(int)` to require updating this `docID` field. Most implementations 
already do this, it would mostly be a change for wrappers (including 
`ConjunctionDISI`), which would need to copy the current doc ID of the wrapped 
iterator to their `docID` field.
   
   


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