Work out similarity search latency instantly with clear inputs, formula shown and shareable results.
A dot-product comparison costs about 2d floating-point operations, so brute-force search over N vectors is 2Nd per query and scales linearly with index size. Approximate indexes change the comparison count rather than the per-comparison cost: HNSW visits roughly a constant multiple of log N nodes, and IVF probes a small fraction of the clusters, which is why they turn a linear scan into a near-constant-time lookup.
Search cost
comparisons: flat = N, HNSW ~ 64 log2(N), IVF ~ 1% of N; FLOPs = comparisons x 2d; latency = FLOPs / throughput
Below roughly a hundred thousand vectors, a vectorised flat scan runs in single-digit milliseconds and gives exact results with no index to build or tune.
Recall. It finds the true nearest neighbours most but not all of the time, and the efSearch parameter buys recall back at a proportional latency cost.