ashvardanian / SimSIMD

Up to 200x Faster Dot Products & Similarity Metrics — for Python, Rust, C, JS, and Swift, supporting f64, f32, f16 real & complex, i8, and bit vectors using SIMD for both AVX2, AVX-512, NEON, SVE, & SVE2 📐
https://ashvardanian.com/posts/simsimd-faster-scipy/
Apache License 2.0
913 stars 51 forks source link

Function to compute L2 norm #135

Closed MBkkt closed 1 month ago

MBkkt commented 3 months ago

Examples under Apache 2.0: https://github.com/ydb-platform/ydb/blob/main/library/cpp/dot_product/dot_product.h#L51

ashvardanian commented 1 month ago

The L2 norm would be equal to the sqrt(l2sq(vec, 0)), so it should be quite easy to do that with existing squared-euclidean distance functionality.