Skip to content

Optimize IndexedDISI by implementing binary search for sparseDocs in advance methods #16348

Description

@rajat315315

Description

If we look at below line of code, we are doing linear search if NumDocs < 4096.

for (; disi.index < disi.nextBlockIndex; ) {

This would be slow if there are repeated searches within the same Block.
I'm attaching a PR where I am trying to optimize it via BinarySearch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions