minimalparts / PeARS

Archive repository for the PeARS project. Please head over to https://github.com/PeARSearch/PeARS-orchard for the latest version.
MIT License
17 stars 21 forks source link

Improved cosine similarity function #10

Closed minimalparts closed 9 years ago

minimalparts commented 9 years ago

Here is my tiny contribution to making things run faster. I realised I could use the numpy implementations for multiplying vectors, as well as summing components. The new cosine runs in roughly 0.2 ms (most of the time!)