(dimension)
| 2 | import { createVectorStore } from '../vector/index.js'; |
| 3 | |
| 4 | function randomVector(dimension) { |
| 5 | const vec = new Float32Array(dimension); |
| 6 | for (let i = 0; i < dimension; i += 1) { |
| 7 | vec[i] = Math.random(); |
| 8 | } |
| 9 | return vec; |
| 10 | } |
| 11 | |
| 12 | function summarize(label, ms, count) { |
| 13 | const per = ms / count; |