| Reduce allocations | Pre-allocate, reuse | withcapacity, object pools | | Improve cache | Contiguous data | Vec, SmallVec | | Parallelize | Data parallelism | rayon, threads | | Avoid copies | Zero-copy | References, Cow | | Reduce indirection | Inline data | smallvec, arrays |
| Latency requirements | domain- | What's acceptable response time? | | Throughput needs | domain- | How many requests per second? | | Memory constraints | domain- | What's the memory budget? |
| cargo bench | Micro-benchmarks | | criterion | Statistical benchmarks | | perf / flamegraph | CPU profiling | | heaptrack | Allocation tracking | | valgrind / cachegrind | Cache analysis |
CRITICO: utilizzare per l'ottimizzazione delle prestazioni. Trigger: prestazioni, ottimizzazione, benchmark, profilazione, flamegraph, criterio, lento, veloce, allocazione, cache, SIMD, rendilo più veloce, 性能优化, 基准测试 Fonte: actionbook/rust-skills.