nickna / Neighborly

An open-source vector database
MIT License
9 stars 2 forks source link

Memory-efficient overloaded operators (+,-,/) for Vectors #4

Closed nickna closed 3 weeks ago

nickna commented 1 month ago

In the +, -, and / operators of Vector, we're creating a new byte array for the result. If the original values are not needed afterward, performing the operations in place on one of the input vectors can avoid this.