From 4b5db94307ff610f839da8e724b94360895f6d34 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 6 Oct 2023 14:27:09 -0700 Subject: [PATCH] Disable closer caching for new elements for now --- src/hnswutils.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hnswutils.c b/src/hnswutils.c index bbb9120..e7d1705 100644 --- a/src/hnswutils.c +++ b/src/hnswutils.c @@ -1059,12 +1059,11 @@ HnswInsertElement(HnswElement element, HnswElement entryPoint, Relation index, F lw = w; /* - * Candidates are sorted, but not deterministically. Set + * Candidates are sorted, but not deterministically. Could set * sortCandidates to true for in-memory builds to enable closer - * caching. Could alternatively skip caching here, but there does not - * seem to be a difference in performance either way. + * caching, but there does not seem to be a difference in performance. */ - neighbors = SelectNeighbors(lw, lm, lc, procinfo, collation, element, NULL, NULL, index == NULL); + neighbors = SelectNeighbors(lw, lm, lc, procinfo, collation, element, NULL, NULL, false); AddConnections(element, neighbors, lm, lc);