Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
antonha committed Mar 1, 2024
1 parent 9dc221f commit 0319617
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ final class DocIdsWriter {
private final ScratchDocIdSetIterator scratchDocIdSetIterator = new ScratchDocIdSetIterator();

/**
DocIdSetIterator to be used to iterate over the scratch buffer. A single instance is reused to avoid
re-allocating the object. The reset method should be called before each use with the count.
The main reason for existing is to be able to call the {@link IntersectVisitor#visit(DocIdSetIterator)} method
rather than the {@link IntersectVisitor#visit(int)} method. This seems to make a difference in performance,
probably due to fewer virtual calls then happening (once per read call rather than once per doc).
* DocIdSetIterator to be used to iterate over the scratch buffer. A single instance is reused to
* avoid re-allocating the object. The reset method should be called before each use with the
* count.
*
* <p>The main reason for existing is to be able to call the {@link
* IntersectVisitor#visit(DocIdSetIterator)} method rather than the {@link
* IntersectVisitor#visit(int)} method. This seems to make a difference in performance, probably
* due to fewer virtual calls then happening (once per read call rather than once per doc).
*/
private class ScratchDocIdSetIterator extends DocIdSetIterator {

Expand Down

0 comments on commit 0319617

Please sign in to comment.