Skip to content

About

Zero-dependency micro-benchmark runner with statistical median, p90, and ASCII bar charts

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

bench-diff

License: MIT

A zero-dependency micro-benchmark runner with statistical median, p90 calculation, and instant terminal ASCII bar charts.


Why bench-diff?

Setting up large benchmark frameworks (like benchmark.js or tinybench) can be overkill when quickly comparing two algorithms or data structures.

bench-diff takes an exported dictionary of functions and runs high-resolution process.hrtime.bigint profiling with automatic warmup and statistical distributions.


Quick Usage

Create bench.js:

export default {
  "RegExp.test": () => /hello/.test("hello world"),
  "String.includes": () => "hello world".includes("hello"),
};

Run:

npx bench-diff bench.js --iterations 5000

License

MIT © luckdevx

About

Zero-dependency micro-benchmark runner with statistical median, p90, and ASCII bar charts

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages