mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-29 11:13:33 +00:00
ADR-154 §16 (commit 8) named three candidate levers for closing the saturated-regime throughput gap that Opt D (delay-sorted CSR) exposed. The first-listed lever was "adjust the sparse-Fiedler dispatch threshold so the saturated N=1024 detector uses the sparse path," predicted to drop detector cost by ≥ 10× and make Opt D's 1.5× kernel win visible on the top-line bench. Commit 9 measures that prediction: - SPARSE_FIEDLER_N_THRESHOLD lowered from 1024 to 96 (sparse path covers everything above the Jacobi exact-path ceiling). - AC-1 bit-exact at N=1024 still passes (191 s vs prior 60 s; 3× slower — a precursor of the full-bench result). - `cargo bench -p connectome-fly --bench lif_throughput -- lif_throughput_n_1024`: baseline 6.75 s → 20.1 s on the same host. **3× regression, not a win.** Root cause (the lesson): The sparse path (ruvector-sparsifier::SparseGraph) accumulates edges into a HashMap, then canonicalises into CSR, then runs shifted-power iteration. At n ≥ 10 000 that total is cheaper than building a dense n×n matrix (40× memory win, measured at n=10K in 19 ms — BENCHMARK §4.8). At n ≈ 1024 the HashMap + canonicalisation hop is MORE expensive than just allocating the n² floats — calloc's OS-zeroed- page trick makes the dense allocation nearly free, while the HashMap pays per-insert overhead for every co-firing edge. **The sparse path is a scale win at n ≥ 10 000, not a speed win at demo n ≈ 1024.** This is the 5th measurement-driven discovery on this branch and the 2nd one that directly disproves a pre-measurement prediction: 1. Degree-stratified AC-5 null collapses at N=1024 SBM (commit 3) 2. SIMD saturated gain = 1.013×, not ≥ 2× (commit 4) 3. Observer buffer-reuse is 3% slower than calloc (reverted) 4. Fiedler detector dominates saturated bench 450:1 (commit 7) 5. Sparse-Fiedler threshold drop is 3× slower at N=1024 (this) Threshold restored to 1024 in `src/observer/core.rs`. ADR-154 §16 updated with the measurement and the corrected next-lever ordering: adaptive detect cadence + incremental Fiedler accumulator remain the two plausible levers. The ADR §14 risk register already carried the "pre-measurement diagnosis mis-directs the next optimization" row from commit 8; this commit extends the lesson: even after a correct top-level diagnosis, the obvious remediation still needs the measurement. No test weakened. AC-1 still bit-exact at N=1024. All 58 tests on this branch still pass. BENCHMARK.md §4.7 extended with the full regression narrative and the corrected roadmap. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| adr | ||
| analysis | ||
| api | ||
| architecture | ||
| benchmarks | ||
| cloud-architecture | ||
| cnn | ||
| code-reviews | ||
| dag | ||
| development | ||
| examples | ||
| gnn | ||
| guides | ||
| hnsw | ||
| hooks | ||
| implementation | ||
| integration | ||
| nervous-system | ||
| optimization | ||
| plans/subpolynomial-time-mincut | ||
| postgres | ||
| project-phases | ||
| publishing | ||
| research | ||
| reviews | ||
| ruvllm | ||
| rvagent | ||
| security | ||
| sparse-inference | ||
| sql | ||
| testing | ||
| training | ||
| .gitkeep | ||
| .nojekyll | ||
| agi-container.md | ||
| C2-shell-execution-hardening.md | ||
| C8_RESULT_VALIDATION_IMPLEMENTATION.md | ||
| consciousness-api.md | ||
| IMPLEMENTATION-C5.md | ||
| index.html | ||
| INDEX.md | ||
| moe-routing-optimization-analysis.md | ||
| README.md | ||
| REPO_STRUCTURE.md | ||
| research-openfang.md | ||
RuVector Documentation
Complete documentation for RuVector, the high-performance Rust vector database with global scale capabilities.
📚 Documentation Structure
docs/
├── adr/ # Architecture Decision Records
├── analysis/ # Research & analysis docs
├── api/ # API references (Rust, Node.js, Cypher)
├── architecture/ # System design docs
├── benchmarks/ # Performance benchmarks & results
├── cloud-architecture/ # Cloud deployment guides
├── code-reviews/ # Code review documentation
├── dag/ # DAG implementation
├── development/ # Developer guides
├── examples/ # SQL examples
├── gnn/ # GNN/Graph implementation
├── guides/ # User guides & tutorials
├── hnsw/ # HNSW index documentation
├── hooks/ # Hooks system documentation
├── implementation/ # Implementation details & summaries
├── integration/ # Integration guides
├── nervous-system/ # Nervous system architecture
├── optimization/ # Performance optimization guides
├── plans/ # Implementation plans
├── postgres/ # PostgreSQL extension docs
├── project-phases/ # Development phases
├── publishing/ # NPM publishing guides
├── research/ # Research documentation
├── ruvllm/ # RuVLLM documentation
├── security/ # Security audits & reports
├── sparse-inference/ # Sparse inference docs
├── sql/ # SQL examples
├── testing/ # Testing documentation
└── training/ # Training & LoRA docs
Getting Started
- guides/GETTING_STARTED.md - Getting started guide
- guides/BASIC_TUTORIAL.md - Basic tutorial
- guides/INSTALLATION.md - Installation instructions
- guides/AGENTICDB_QUICKSTART.md - AgenticDB quick start
- guides/wasm-api.md - WebAssembly API documentation
Architecture & Design
- architecture/ - System architecture details
- cloud-architecture/ - Global cloud deployment
- adr/ - Architecture Decision Records
- nervous-system/ - Nervous system architecture
API Reference
- api/RUST_API.md - Rust API reference
- api/NODEJS_API.md - Node.js API reference
- api/CYPHER_REFERENCE.md - Cypher query reference
Performance & Benchmarks
- benchmarks/ - Performance benchmarks & results
- optimization/ - Performance optimization guides
- analysis/ - Research & analysis docs
Security
- security/ - Security audits & reports
Implementation
- implementation/ - Implementation details & summaries
- integration/ - Integration guides
- code-reviews/ - Code review documentation
Specialized Topics
- gnn/ - GNN/Graph implementation
- hnsw/ - HNSW index documentation
- postgres/ - PostgreSQL extension docs
- ruvllm/ - RuVLLM documentation
- training/ - Training & LoRA docs
Development
- development/CONTRIBUTING.md - Contribution guidelines
- development/MIGRATION.md - Migration guide
- testing/ - Testing documentation
- publishing/ - NPM publishing guides
Research
- research/ - Research documentation
- cognitive-frontier/ - Cognitive frontier research
- gnn-v2/ - GNN v2 research
- latent-space/ - HNSW & attention research
- mincut/ - MinCut algorithm research
🚀 Quick Links
For New Users
- Start with Getting Started Guide
- Try the Basic Tutorial
- Review API Documentation
For Cloud Deployment
- Read Architecture Overview
- Follow Deployment Guide
- Apply Performance Optimizations
For Contributors
- Read Contributing Guidelines
- Review Architecture Decisions
- Check Migration Guide
For Performance Tuning
- Review Optimization Guide
- Run Benchmarks
- Check Analysis
📊 Documentation Status
| Category | Directory | Status |
|---|---|---|
| Getting Started | guides/ | ✅ Complete |
| Architecture | architecture/, adr/ | ✅ Complete |
| API Reference | api/ | ✅ Complete |
| Performance | benchmarks/, optimization/, analysis/ | ✅ Complete |
| Security | security/ | ✅ Complete |
| Implementation | implementation/, integration/ | ✅ Complete |
| Development | development/, testing/ | ✅ Complete |
| Research | research/ | 📚 Ongoing |
Total Documentation: 460+ documents across 60+ directories
🔗 External Resources
- GitHub Repository: https://github.com/ruvnet/ruvector
- Main README: ../README.md
- Changelog: ../CHANGELOG.md
- License: ../LICENSE
Last Updated: 2026-02-26 | Version: 2.0.4 (core) / 0.1.100 (npm) | Status: Production Ready