benwtrent commented on code in PR #14963: URL: https://github.com/apache/lucene/pull/14963#discussion_r2380391172
########## lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99HnswVectorsWriter.java: ########## @@ -575,16 +612,27 @@ static int distFuncToOrd(VectorSimilarityFunction func) { throw new IllegalArgumentException("invalid distance function: " + func); } + private static boolean shouldCreateGraph(int k, int numNodes) { + int expectedVisitedNodes = + expectedVisitedNodes(k, numNodes); // k is typically small, so this is cheap + return numNodes > expectedVisitedNodes; Review Comment: > We could confirm with another run if this is not having any negative impact on performance numbers. Yeah, its definitely changing performance. It removes the magnitude requirement. Also, I noticed it has a bug, I am fixing that and will push shortly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org