From b5ae5fe9e7e6118ad8d2b18c3b59de93b6a6052b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 4 Oct 2023 18:14:08 -0700 Subject: [PATCH] Updated comments [skip ci] --- src/hnswutils.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/hnswutils.c b/src/hnswutils.c index 50e3676..d04aaf1 100644 --- a/src/hnswutils.c +++ b/src/hnswutils.c @@ -770,16 +770,20 @@ SelectNeighbors(List *c, int m, int lc, FmgrInfo *procinfo, Oid collation, HnswE w = list_delete_last(w); /* - * r and wd will be the same as previous calls until the new element, - * so can skip distance calculations for as many elements as there is - * state for + * r and wd will be the same as previous calls until the new + * candidate, so can skip distance calculations for as many candidates + * as there is state for */ if (mustCalculate) closer = CheckElementCloser(e, r, lc, procinfo, collation); else if (e->element == e2->neighbors[lc].firstPruned) { closer = false; - /* TODO Store multiple pruned and only calculate when exhausted */ + + /* + * Could store multiple pruned and only calculate when exhausted + * (or store full state) at the expense of memory + */ mustCalculate = true; } else if (e == newCandidate)