Skip to content

Commit 5aba6c6

Browse files
committed
hnswalg.h: reduce M cap further to 10000
per comment in merge request discussion.
1 parent 6a3a0f4 commit 5aba6c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hnswlib/hnswalg.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ class HierarchicalNSW : public AlgorithmInterface<dist_t> {
101101
data_size_ = s->get_data_size();
102102
fstdistfunc_ = s->get_dist_func();
103103
dist_func_param_ = s->get_dist_func_param();
104-
if ( M <= 100000 ) {
104+
if ( M <= 10000 ) {
105105
M_ = M;
106106
} else {
107-
std::cerr << "warning: M parameter exceeds 100000 which may lead to adverse effects." << std::endl;
108-
std::cerr << " Cap to 100000 will be applied for the rest of the processing." << std::endl;
109-
M_ = 100000;
107+
std::cerr << "warning: M parameter exceeds 10000 which may lead to adverse effects." << std::endl;
108+
std::cerr << " Cap to 10000 will be applied for the rest of the processing." << std::endl;
109+
M_ = 10000;
110110
}
111111
maxM_ = M_;
112112
maxM0_ = M_ * 2;

0 commit comments

Comments
 (0)