From c28f4683f77b2d40c1b3f703f502b958dbe4b4c1 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 4 Oct 2023 18:03:04 -0700 Subject: [PATCH] Updated comment [skip ci] --- src/hnswutils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hnswutils.c b/src/hnswutils.c index 9122b34..50e3676 100644 --- a/src/hnswutils.c +++ b/src/hnswutils.c @@ -769,7 +769,11 @@ 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 new element */ + /* + * 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 + */ if (mustCalculate) closer = CheckElementCloser(e, r, lc, procinfo, collation); else if (e->element == e2->neighbors[lc].firstPruned)