timescale / pgvectorscale

A complement to pgvector for high performance, cost efficient vector search on large workloads.
PostgreSQL License
1.38k stars 58 forks source link

Support neon simd for distance calculations in aarch64 #126

Closed knudtty closed 4 days ago

knudtty commented 3 months ago

Neon intrinsics have been stabilized in Rust since version 1.59.0. Arm processors are becoming more and more used for computing, including cloud servers and DBs. Could we get SIMD support for aarch64 chips?

For context, it appears simdeez has published development versions to crates.io that support neon but not a new stable version, and there have been no commits to the repo in the last year.

I did manage to get a solution based off of the existing distance_x86 optimized function and using the rust core for aarch64 intrinsics. I'll submit a PR but would appreciate discussion here for architectural discussion if need be