I built my own little benchmarking system in preparation for my RustWeek talk! It's inspired by Criterion, and it can measure multiple statistics (from perf) simultaneously.
> cargo bench --bench perf -- test-data/crates.io-10k.txt
alpha: warming up...
alpha: measuring (307143488 iters)
17.63 ns/iter ± 0.69
52.69 real cycles/iter ± 2.38
53.14 ref cycles/iter ± 2.42
167.68 instructions/iter ± 3.36
0.38 LLC refs/iter ± 0.03
0.05 LLC misses/iter ± 0.01
26.28 branches/iter ± 0.40
0.50 branch mispreds/iter ± 0.07
beta: warming up...
beta: measuring (350176962 iters)
15.42 ns/iter ± 0.71
45.83 real cycles/iter ± 2.42
46.15 ref cycles/iter ± 2.48
142.52 instructions/iter ± 2.68
0.34 LLC refs/iter ± 0.03
0.05 LLC misses/iter ± 0.01
22.04 branches/iter ± 0.36
0.48 branch mispreds/iter ± 0.07
Now to apply all the optimizations I have in mind and watch these per-iter counts go down :D



