hnswlib
hnswlib copied to clipboard
Number of bits for storing the delete mark of each element
Hi @Yury Malkov,
In the comment for function 'markDeletedInternal', it states that "Uses the first 8 bits of the memory for the linked list to store the mark...". However, from the implementations of function "getListCount" and "markDeletedInternal", we can see that the first 16 bits are used to store the delete mark and the lower 16 bits are used to store the number of neighbors. It is a bit confusing here.
https://github.com/nmslib/hnswlib/blob/2571bdb6ef3f91d6f4c2e59178fde49055d2f980/hnswlib/hnswalg.h#L795-L798 https://github.com/nmslib/hnswlib/blob/2571bdb6ef3f91d6f4c2e59178fde49055d2f980/hnswlib/hnswalg.h#L819-L821
Yes. It is strange. I do not remember the exact reason why it has been changed, but it seems we forgot to update the comments.
Yep. It seems I've changed it and forgot to update the comments. Thanks for reporting!