Fast & Accurate
High-precision timing with advanced statistical analysis. Choose between the fast tinybench engine or the accurate engine with V8 optimization guards and IQR outlier removal.
Fast & Accurate
High-precision timing with advanced statistical analysis. Choose between the fast tinybench engine or the accurate engine with V8 optimization guards and IQR outlier removal.
Multiple Output Formats
Generate human-readable, simple text, JSON, and CSV reports simultaneously. Auto-detects environment for optimal output.
Historical Tracking
Store and compare benchmark results over time. Track performance trends and catch regressions early.
Profile & Discover
Identify hot code paths with built-in profiling. Run any command with V8’s profiler to find benchmark candidates automatically.
CLI & API
Powerful command-line interface with sensible defaults, plus a programmatic API for advanced usage.
TypeScript Support
Write benchmarks in JS or TS.
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; },};# Run all benchmarksmodestbench
# Run with specific optionsmodestbench --iterations 5000 --reporter human --reporter jsonmodestbench provides a powerful benchmarking framework with dual engines and rich features:
tinybench for development, accurate for precision measurementsWhether you’re optimizing a hot code path, comparing algorithm implementations, or setting up performance regression testing in CI, modestbench has you covered.