Microbenchmarking with Criterion.rs
•system
Why Benchmark?
If you don't measure it, you haven't optimized it.
Setting Up Criterion
Add criterion to your dev-dependencies in Cargo.toml.
[dev-dependencies]
criterion = "0.5"
Analyzing Results
Criterion generates a detailed HTML report highlighting regression and performance shifts.