|
|
|
|
|
by ashvardanian
647 days ago
|
|
Three separate passes over JavaScript arrays are quite costly, especially for high-dimensional vectors. I'd recommend using `TypedArray` with vanilla `for` loops. It will make things faster, and will allow using C extensions, if you want to benefit from modern hardware features, while still implementing the logic in JavaScript: https://ashvardanian.com/posts/javascript-ai-vector-search/ |
|