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
New cosine_similarity_matrix API for pre-built NumPy candidate matrices, achieving speedup over list-based API by eliminating Python object iteration overhead. Optimized for production RAG pipelines and vector search with large candidate sets.
Comprehensive test suite for cosine_similarity_matrix with 13 test cases covering edge cases, type conversions, batching behavior, and equivalence with existing API.
Benchmark script matrix_vs_list_api.py demonstrating performance comparison between matrix and list-based APIs across various dataset sizes.
Comprehensive benchmark script matrix_vs_numpy_sklearn.py comparing SymRank against multiple NumPy baseline strategies (naive, precomputed norms, normalized candidates) and scikit-learn, demonstrating large speedup across N=100-10,000.
Changed
Optimized top-k selection in Rust core by replacing redundant sort_unstable_by with iterator reversal. The heap's into_sorted_vec() already returns sorted results, so reversing the iterator achieves descending order without an additional O(k log k) sort operation.
Updated all Rust dependencies to latest stable versions:
numpy 0.25.0 → 0.27.1
pyo3 0.25.0 → 0.27.2
ordered-float 5.0.0 → 5.1.0
rayon 1.10.0 → 1.11.0
rand 0.9.1 → 0.9.2
wide 0.7.32 → 1.1.1
Refactored speed_comparisons_streaming_10k.py to include matrix API comparison and align NumPy baseline with production-ready normalized candidates pattern.
Optimized cosine similarity scoring loop with explicit zero-norm handling for query and candidate vectors.
Stabilized SIMD-based cosine similarity implementation while preserving existing performance characteristics.
Fixed
Prevented division-by-zero in cosine similarity when encountering zero-norm candidate vectors.
Resolved duplicate ndarray dependency versions by aligning all crates to ndarray 0.17.1.
Removed
Archived deprecated benchmark scripts:
speed_comparison.py
speed_comparisons_with_batch.py
speed_standard_vs_batch.py
results_comparisons.py
speed_comparisons_streaming_10k_batch.py
simd_vs_standard.py
These scripts are superseded by the comprehensive matrix_vs_numpy_sklearn.py benchmark or test internal implementation details not relevant to users.