-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Priority: Medium
Collection of medium-priority improvements identified during code review.
1. Integer overflow risk in node ID (theoretical)
- Location: HNSW node allocation
- Risk: Node IDs could overflow on very large indexes (billions of vectors)
- Fix: Use checked arithmetic or u64
2. Missing NEON Manhattan distance
- Location:
src/distance/simd.rs - Issue: Manhattan (L1) distance not implemented for ARM NEON
- Impact: Falls back to scalar on ARM
3. Hardcoded 32-layer max in HNSW
- Location: HNSW index implementation
- Issue: Maximum 32 layers hardcoded
- Impact: May limit index depth for very large datasets
- Fix: Make configurable or use dynamic allocation
4. Memory allocation in search hot path
- Location: HNSW/IVFFlat search functions
- Issue:
.clone()calls during search allocate memory - Impact: GC pressure, cache misses
- Fix: Use arena allocator or pre-allocated buffers
5. Fragile typmod array parsing
- Location: Vector type parsing
- Issue: Manual parsing of dimension from typmod
- Impact: Could fail on edge cases
- Fix: Use proper PostgreSQL typmod utilities
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request