memrust v0.5.4
Performance release. Every number below was measured with the scripts in benches/.
Recall is ~3x faster and now hits recall@10 = 1.000 (was 1.92 ms / 0.985 at 20k vectors, now 0.64 ms / 1.000). Profiling found the filter predicate running on every visited node even when nothing needed filtering — and its presence engaged a traversal visit cap that was quietly costing recall. Recall also no longer deep-clones hundreds of candidate records before discarding all but top-k.
Writes no longer block readers for the duration of an fsync. The write path is split: the record is persisted while holding only a read lock, then the exclusive lock is taken briefly to make it visible. Reads under a concurrent writer went from 467 to 957 QPS with p50 halved (8.52 → 4.78 ms). A commit lock brackets both phases so a checkpoint cannot land between them and lose an acknowledged write — verified with four writers racing a checkpoint loop plus kill -9: 1,000 acknowledged, 1,000 recovered.
Bulk ingest no longer fails on real batches. The HTTP body limit was axum's 2 MB default, which rejected batches over ~400 memories at 384 dims. Raised to 256 MB. Batch ingest also group-commits one fsync per batch (221 → ~990 records/s).
ef_search is settable per query, in the HTTP API and both SDKs — trade latency for accuracy without restarting.
Known limitation, stated plainly: a concurrent writer still costs about half of read throughput, because HNSW insertion (~2 ms) runs under the exclusive lock. Single-writer remains a design constraint.
cargo install memrust # or grab a binary below
pip install --upgrade memrust
npm install memrust-client