-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove redundant judgments during the HNSW search process #38
Conversation
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
@@ -1404,13 +1404,9 @@ HierarchicalNSW::searchKnn(const void* query_data, | |||
} | |||
|
|||
MaxHeap top_candidates; | |||
if (num_deleted_) { | |||
top_candidates = | |||
searchBaseLayerST<true, true>(currObj, query_data, std::max(ef, k), isIdAllowed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this logic ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
num_deleted_ is the original logic for marking deletions in HNSW, but we no longer rely on this logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
No description provided.