2 ms·
You can see how I did something similar in my library here: https://github.com/Dicklesworthstone/fast_vector_similarity/blob/main/src/lib.rs https://github.com
by eigenvalue 3y ago
You can see how I did something similar in my library here:
https://github.com/Dicklesworthstone/fast_vector_similarity/blob/main/src/lib.rs https://github.com/Dicklesworthstone/fast_vector_similarity/...
Basically you use ndarray instead of numpy, try to vectorize anything you can, and for the for loops that can’t be vectorized, you can use rayon to do them in parallel.