[HN Gopher] Hann: A Fast Approximate Nearest Neighbor Search Lib...
       ___________________________________________________________________
        
       Hann: A Fast Approximate Nearest Neighbor Search Library for Go
        
       Author : habedi0
       Score  : 78 points
       Date   : 2025-03-25 11:57 UTC (11 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | nikolayasdf123 wrote:
       | > Fast distance computation using SIMD (AVX) instructions
       | 
       | cool to see this. however, really missing benchmarks to compare
       | to Redis, Vertex, Elastic, FAISS
        
       | nikolayasdf123 wrote:
       | > requires C (or C++) compile
       | 
       | so this is just FFI into C? hm...
        
         | dolmen wrote:
         | 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
        
       | thomasahle wrote:
       | https://ann-benchmarks.com/
        
         | imurray wrote:
         | 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.
        
       | oldgregg wrote:
       | Great lib... now is there a Go-native way to generate vectors
       | from text?
        
         | redskyluan wrote:
         | Try ollama? It support several embedding models
        
       | neonsunset wrote:
       | 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)
        
       ___________________________________________________________________
       (page generated 2025-03-25 23:01 UTC)