I also notice you use FMA in your AVX2 L2 distance calculation. I don't think pg_vector enables that, so SimSIMD might be slightly faster.
Also interesting that it beats NumPy/SciPy by so much! I wonder what they're doing..
Also interesting that it beats NumPy/SciPy by so much! I wonder what they're doing..
https://github.com/scipy/scipy/blob/main/scipy/spatial/src/d...