Fast & Accurate
Choose your poison: the peppy tinybench engine for quick iterations, or the accurate engine with V8 optimization guards when you really need statistical rigor. Who knows? You could!
Look, we like tinybench too. It’s great! But we got tired annoyed inspired after writing the same wrapper code around it for the quinquagintacentillionth time. We have more homegrown wrappers than B-Real.
We wanted a benchmarking framework that didn’t make us think (because we are stupid). One that just worked—with sensible defaults, multiple output formats, historical tracking, and a built-in profiler to tell us what’s even worth benchmarking. Plug-and-f’ing-play, fam.
modestbench is what happens when you swaddle a minimal benchmarking library in scads of overengineered-but-useful features so you can focus on making your code fast. That’s we’re selling, anyway.
Fast & Accurate
Choose your poison: the peppy tinybench engine for quick iterations, or the accurate engine with V8 optimization guards when you really need statistical rigor. Who knows? You could!
Multiple Output Formats
Human-readable terminal output. JSON for your CI pipeline. CSV for your spreadsheets so you can make those sweet, sweet line graphs. Simultaneous.
Historical Tracking
Tracks every run automatically. Compare historical results. Detect performance regressions before they ship. Set a budget, even! You are now a Real Developer.
Profile & Discover
Don’t know what to benchmark? Run just whatever with V8’s built-in profiler and it’ll tell you exactly where the code’s hot. Do you really want to open a profile visualizer?
CLI & API
Powerful CLI with “sensible” defaults. Programmatic API for when you … have a use-case for this, I guess?
TypeScript Support
Fully type-safe. Write your benchmarks in JS or TS. CJS or ESM. No loader.
export default { 'Array.push()': () => { const arr = []; for (let i = 0; i < 1000; i++) { arr.push(i); } return arr; },
'Array spread': () => { let arr = []; for (let i = 0; i < 1000; i++) { arr = [...arr, i]; } return arr; },};Just export an object with functions and modestbench figures out the rest.
# Run all benchmarks (finds .bench.js files automatically)modestbench
# We have lots of options; here are somemodestbench --iterations 5000 --reporter human --reporter jsonBoom. Done. Results printed to your terminal, saved to JSON, and tracked in history. You’re welcome.
We built modestbench because we got tired of:
tinybench is great but doesn’t handle discovery, configuration, or reportingtinybench for development, accurate for when you need the receiptsWhether you’re optimizing a hot loop, comparing algorithm implementations, or setting up performance regression testing in CI, modestbench might even work for you.