Hacker News new | past | comments | ask | show | jobs | submit login
Hann: A Fast Approximate Nearest Neighbor Search Library for Go (github.com/habedi)
91 points by habedi0 24 days ago | hide | past | favorite | 8 comments




That nice benchmark shows that multiple implementations of HNSW perform differently (my experience also). It would be helpful therefore if HANN benchmarked its implementation against the others, and tried to get the details the same as the best version.


> Fast distance computation using SIMD (AVX) instructions

cool to see this. however, really missing benchmarks to compare to Redis, Vertex, Elastic, FAISS


> requires C (or C++) compile

so this is just FFI into C? hm...


I see only two C files in the repo: https://github.com/habedi/hann/blob/main/core/simd_distance.... https://github.com/habedi/hann/blob/main/core/simd_ops.c

So fixing to make it compile just with the Go toolchain (probably by rewriting in assembly) seems doable. Using avo to produce assembly: https://github.com/mmcloughlin/avo


Great lib... now is there a Go-native way to generate vectors from text?


Try ollama? It support several embedding models


Another project that can be written in pure C# is written in Go instead which is struggling to solve the problem :(

(and by struggling I mean can’t do it at all and requires either FFI or Goasm)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: