benchmarking

Benchmarking hot paths (allocs and throughput)

When latency matters, I benchmark the smallest interesting unit and watch allocations. In Go, a surprising number of regressions come from accidental heap churn: converting []byte to string, building lots of temporary maps, or using fmt.Sprintf in loo

Criterion for benchmarking with statistical analysis

Criterion is the standard benchmarking library for Rust. It runs benchmarks multiple times, detects outliers, and reports statistical confidence intervals. The API is simple: wrap your code in a closure, and criterion measures execution time. It gener