Developer Tooling · zero-dependency · MIT

larzbench

Micro-benchmarking.

Benchmark and compare functions with clean statistics and ranking — a small, dependency-free tool for measuring where time actually goes.

larzscript pkg install bench
View on GitHub →Learn the stack

What you get

Try it

import "bench" as bench
fn slow_sum(n) { let t = 0; for i in range(n) { t = t + i }; return t }
let r = bench.benchmark(fn() { return slow_sum(1000) }, 200)
print("runs:", r["runs"], "mean(ms):", round(r["mean"] * 1000, 3))
Output
runs: 200 mean(ms): 2.118

Why it's in the Larz Stack

larzbench is a real Larzscript package (larzscript pkg install bench) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.