yahoojapan / NGT

Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data
Apache License 2.0
1.22k stars 112 forks source link

fp16 performance #121

Closed sunacc closed 1 year ago

sunacc commented 2 years ago

Hi dear developer, I find that fp16 has been supported in NGT, and I wonder how fp16 performs compared to fp32. Since the memory usage is half, so theoretically can we get 2x performance?

masajiro commented 2 years ago

This fp16 support means that the memory usage is half as you mentioned but the distance is calculated as fp32 after converting fp16 to fp32 with SIMD.