add FixedBitSet.nextUnsetBit and use it in MergingHnswGraphBuilder#16079
Closed
iprithv wants to merge 1 commit into
Closed
add FixedBitSet.nextUnsetBit and use it in MergingHnswGraphBuilder#16079iprithv wants to merge 1 commit into
iprithv wants to merge 1 commit into
Conversation
Contributor
|
see #16072 |
Contributor
Author
|
thanks @iverase for pointing out, will close this. As that was merged just now i missed it :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
there was a TODO in MergingHnswGraphBuilder.build() where we were scanning all nodes even if most were already initialized, this change adds nextUnsetBit and uses that instead, so we only go over nodes that are not set, instead of checking every node, we just jump to the next unset one.
so earlier it goes through all nodes and check each one, now jump directly to next unset bit.
this is faster when most bits are already set, which is common during merges
benchmark (bitset iteration)
luceneutil (real run)