Open siddhsql opened 3 months ago
it seems there is a map in the code that stores mapping of external ids to internal ids in the variable labellookup.
std::unordered_map<labeltype, tableint> label_lookup_;
where:
https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswlib.h#L125:
typedef size_t labeltype;
https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswalg.h#L14:
typedef unsigned int tableint;
Why can't we use external ids for the internal ids as well? won't it remove unnecessary code and improve perf?
labeltype can be a fix-size str
it seems there is a map in the code that stores mapping of external ids to internal ids in the variable labellookup.
where:
https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswlib.h#L125:
https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswalg.h#L14:
Why can't we use external ids for the internal ids as well? won't it remove unnecessary code and improve perf?