ashvardanian / StringZilla

Up to 10x faster strings for C, C++, Python, Rust, and Swift, leveraging NEON, AVX2, AVX-512, and SWAR to accelerate search, sort, edit distances, alignment scores, etc 🦖
https://ashvardanian.com/posts/stringzilla/
Apache License 2.0
2.05k stars 66 forks source link

Generalize skewed diagonal approach to rectangular matrices #78

Open ashvardanian opened 7 months ago

ashvardanian commented 7 months ago

Currently, the anti-diagonal approach for Levenshtein distance is only implemented for square matrices. It should be easy to generalize it to rectangular ones, opening opportunities for more aggressive vectorization.

https://github.com/ashvardanian/StringZilla/blob/06423189e7a5b9e2882b471e98ec897d40734fc4/include/stringzilla/stringzilla.h#L2010-L2013