Lesson 45 of 50
rustProfiling and Benchmarking
15 minutes
Course progress90%
Profiling and Benchmarking
Use the criterion crate for micro‑benchmarks.
[dev-dependencies]
criterion = \"0.4\"
use criterion::{black_box, criterion_group, criterion_main, Criterion};
fn fibonacci(n: ) {
n {
=> ,
=> ,
_ => (n-) + (n-),
}
}
(c: & Criterion) {
c.(\