mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-06 09:18:52 +00:00
Reduced calls to AddToVisited [skip ci]
This commit is contained in:
1 parent
a0fddf2d1d
commit
5266c208a6
1 file changed
+2
-3
+2
-3
@@ -824,8 +824,6 @@ HnswSearchLayer(char *base, Datum q, List *ep, int ef, int lc, Relation index, F
|
||||
if (v == NULL)
|
||||
{
|
||||
v = &v2;
|
||||
|
||||
/* Keep scan-build happy */
|
||||
initVisited = true;
|
||||
}
|
||||
|
||||
@@ -846,7 +844,8 @@ HnswSearchLayer(char *base, Datum q, List *ep, int ef, int lc, Relation index, F
|
||||
bool found;
|
||||
HnswPairingHeapNode *node;
|
||||
|
||||
AddToVisited(base, v, hc->element, index, &found);
|
||||
if (initVisited)
|
||||
AddToVisited(base, v, hc->element, index, &found);
|
||||
|
||||
node = CreatePairingHeapNode(hc);
|
||||
pairingheap_add(C, &node->c_node);
|
||||
|
||||
Reference in new issue
Block a user