-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Eugene Lazutkin edited this page Mar 5, 2026
·
14 revisions
nano-benchmark provides command-line utilities for micro-benchmarking code
with nonparametric statistics and significance testing.
Node, Deno and Bun are supported.
Two utilities are available:
- nano-watch — continuously benchmarks a single function, showing live statistics and memory usage.
- nano-bench — benchmarks and compares multiple functions, calculating confidence intervals and statistical significance.
Read the concepts page first for background on the approach.
Use --self to get the script path for running with alternative interpreters:
$ npx nano-bench benchmark.js
$ bun `npx nano-bench --self` benchmark.js
$ deno run --allow-read --allow-hrtime `npx nano-bench --self` benchmark.js
$ deno run -A `npx nano-bench --self` benchmark.js
$ node `npx nano-bench --self` benchmark.jsCLI tools
Background
Reference