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.
Tagging System
Organize and filter benchmarks by categories. Run specific subsets with flexible tag-based filtering.
CLI & API
Powerful command-line interface with sensible defaults, plus a programmatic API for advanced usage.
TypeScript Support
Full type safety with comprehensive TypeScript definitions. 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 --reporters human,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.