hnswlib
hnswlib copied to clipboard
multi thread for addPoint?
The commit of apoorv-sharma support multi threads for addPoint? Will this patch reduce the time of the building a hnsw graph?
Hello @WaterElapse,
The addPoint supported multithreaded writes before my commit. In my commit, I have added support for performing true vector updates in multi-threaded manner i.e for an existing point in the index you can change the vector associated with it by modifying the graph in memory, without needing to rebuild the index from the scratch. As part of the commit, I have also fixed a bug that existed while adding points. This fix should provide marginal improvements in the build time for hnsw graph.
@apoorv-sharma What bug did you fix?
While building the index, farthest point was being selected at each level as the entry point for the next level. I fixed the code to select the nearest point.