mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-06-02 07:29:19 +00:00
Security improvements (v0.1.86-87): - Add NEURAL_CONSTANTS with 27 named constants replacing magic numbers - Add NeuralLogger interface with configurable logging (no more console.warn) - Add readonly modifiers to interface properties for immutability - Add input validation: ID length, content length, embedding dimensions - Add resource limits: MAX_MEMORIES=10000, MAX_AGENTS=1000, MAX_DRIFT_EVENTS=1000 - Add stale agent cleanup in EmbeddingStateMachine (1hr timeout) - Add cluster detection limits to prevent O(n²) DoS (MAX_CLUSTER_AGENTS=500) - Add zero-vector handling in cosine similarity - Fix reflex error handling with graceful degradation Performance optimizations (v0.1.88): - LRUCache: O(1) get/set/evict with doubly-linked list + hash map (2x faster) - Float32BufferPool: Pre-allocated buffer reuse (17x faster, 100% reuse) - TensorBufferManager: Named working buffers for intermediate computations - VectorOps: 8x loop unrolling for dot/distance (1.3-1.5x faster) - VectorOps: 4x unrolling + local vars for cosine (1.6x faster) - ParallelBatchProcessor: Chunked concurrent processing - OptimizedMemoryStore: Combined LRU cache + buffer pool Benchmark results: - Buffer Pool: 0.06 µs vs 1.03 µs (17x improvement) - LRU Cache eviction: O(1) vs O(n) - Cosine similarity: 0.39 µs vs 0.61 µs (1.6x improvement) - Memory store search: 703 µs vs 1301 µs (2x improvement) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| benchmark-gnn.js | ||
| benchmark-hooks.js | ||
| benchmark-perf.js | ||
| integration.js | ||
| mock-implementation.js | ||
| standalone-test.js | ||