diff --git a/src/assets/images/hnswlib_layout.png b/src/assets/images/hnswlib_layout.png new file mode 100644 index 0000000..78e28ec Binary files /dev/null and b/src/assets/images/hnswlib_layout.png differ diff --git a/src/databases/vectordb/hnsw.md b/src/databases/vectordb/hnsw.md index e5a21b2..cc46a44 100644 --- a/src/databases/vectordb/hnsw.md +++ b/src/databases/vectordb/hnsw.md @@ -18,6 +18,10 @@ - [IndexHNSW from faiss](https://github.com/facebookresearch/faiss/blob/main/faiss/IndexHNSW.cpp) - [pgvector](https://github.com/pgvector/pgvector) +hnswlib 的内存 layout 如下,可以帮助理解 hnswlib 的代码: + +![hnswlib layout](/assets/images/hnswlib_layout.png) + #### References: - [Graph-Based Approximate Nearest Neighbors (ANN) and HNSW](https://www.youtube.com/watch?v=4PsyNdFlxmk)