This directory contains profiling scripts, reports, and analysis for Ruvector performance optimization.
profiling/
├── scripts/ # Profiling and benchmarking scripts
├── reports/ # Generated profiling reports
├── flamegraphs/ # CPU flamegraphs
├── memory/ # Memory profiling data
└── benchmarks/ # Benchmark results
- perf: Linux performance counters
- flamegraph: Visualization of CPU hotspots
- cargo-flamegraph: Integrated Rust profiling
- valgrind: Memory leak detection and profiling
- heaptrack: Heap memory profiling
- massif: Heap profiler
- perf-cache: Cache miss analysis
- cachegrind: Cache simulation
# Install profiling tools
./scripts/install_tools.sh
# Run CPU profiling
./scripts/cpu_profile.sh
# Run memory profiling
./scripts/memory_profile.sh
# Generate flamegraph
./scripts/generate_flamegraph.sh
# Run comprehensive benchmark suite
./scripts/benchmark_all.sh- Throughput: 50,000+ queries per second (QPS)
- Latency: Sub-millisecond p50 latency (<1ms)
- Recall: 95% recall at high QPS
- Memory: Efficient memory usage with minimal allocations in hot paths
- Scalability: Linear scaling from 1-128 threads
-
CPU Optimization
- SIMD intrinsics (AVX2/AVX-512)
- Target-specific compilation
- Hot path optimization
-
Memory Optimization
- Arena allocation
- Object pooling
- Zero-copy operations
-
Cache Optimization
- Structure-of-Arrays layout
- Cache-line alignment
- Prefetching
-
Concurrency Optimization
- Lock-free data structures
- RwLock optimization
- Rayon tuning
-
Compile-Time Optimization
- Profile-Guided Optimization (PGO)
- Link-Time Optimization (LTO)
- Target CPU features