Rust theorytheory 0/50 · 0%
Toolchain · medium

37. Performance and Profiling

Release builds and measurement.

Always measure release builds — debug is far slower. criterion provides statistically sound benchmarks; flamegraph and perf reveal hot paths. Common wins are avoiding needless clones, reserving capacity, and choosing the right collection.

Check your understanding

  1. 1. Benchmarks should run against…

  2. 2. Which crate gives statistical benchmarks?