You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behaviour: each per-level neighbour list is a
variable-length Vec<u64>; growth triggers reallocations during
pruning even though we know the max length per level (M0 or M).
Why it might be a bottleneck: extra Vec headers per layer
(24 B), and the allocator pressure during pruning cycles. With M=16
and 16 layers (max_level cap), 32 layers/node x N nodes of Vec
headers is real RAM.
Suggested direction: use a single flat Vec<SmallVec<[u32; M0]>> per node, or per-layer [u32; M0] arrays packed inside a global arena. Pruning then
truncates instead of dropping a Vec. Pairs with Fix examples #3.
Risk / scope: small, contained to writer; saves both heap and
CPU during build.
ID: VI-23 — see ~/.claude/tasks/laurus/20260523_perf_round3_audit/task_list.md for the full Round-3 issue list.
Round-3 perf push sub-issue (tracked under umbrella #535).
[S] HNSW per-level fixed-stride neighbour packing during build (M0 / M known up front)
laurus/src/vector/index/hnsw/writer.rs:42-56,107-114.variable-length
Vec<u64>; growth triggers reallocations duringpruning even though we know the max length per level (M0 or M).
Vecheaders per layer(24 B), and the allocator pressure during pruning cycles. With M=16
and 16 layers (max_level cap), 32 layers/node x N nodes of
Vecheaders is real RAM.
Vec<SmallVec<[u32; M0]>>per node, or per-layer[u32; M0]arrays packed inside a global arena. Pruning thentruncates instead of dropping a
Vec. Pairs with Fix examples #3.CPU during build.
ID:
VI-23— see~/.claude/tasks/laurus/20260523_perf_round3_audit/task_list.mdfor the full Round-3 issue list.